ENGR 101 Midterm: ENG101_Matlab_Review

78 views5 pages

Document Summary

Program - a sequence of statements that give instructions for computer to execute. Functions - run a group of commands with given input. Interface - defines how we interact with a function (name, parameters, return variable) () call a function or logical arrays or indexing. {} create a cell-matrix disp(a) input( input a value for a: "); Order of operations: parentheses(, transpose(. ") power(. ^, negation (~, multiplication (. *) division(. /: addition (+) subtraction(-, colon(:, logical comparisons(=,==,~=) : - is equivalent to 1:end sum(a) - takes the sum of every column of a min(a) - gives the minimum of the columns of a max(a) - gives the maximum of the columns of a. A(:,2) = [] - deletes the second column of a. A(:,[1 3 4]) - selects columns 1, 3, and 4 flipud(a) - flips matrix up and down fliplr(a) - flips matrix left to right.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents