AT&T LTE 9:22 AM 28% L--+ Matlab_exercises 2 DOC 31 KB Basic Array Syntax and Ma
ID: 3746918 • Letter: A
Question
AT&T LTE 9:22 AM 28% L--+ Matlab_exercises 2 DOC 31 KB Basic Array Syntax and Manipulations Close The following exercises are meant to be answered by a single MATLAB command. The command may be involved (i.e., it may use a number of parentheses or calls to functions) but can, in essence, be solved by the execution of a single command. If the command is too complicated, feel free to break it up over two or more lines. Given x - 13 1 579 2 61, explain what the following commands "mean" by by summarizing the net result of the command a. x (3) b. x (1:7 C. x(1:end) d. x(1:end-1) f. x(1 6211]) g. sum (x) 2. Given the array A2 4 1 6 7 2 3 5 9], provide the commands needed to a. assign the first row of A to a vector called x1 b. assign the last 2 rows of A to an array called y c. compute the sum over the columns of A d. compute the sum over the rows of A e. compute the standard error of the mean of each column of the s defi divid number o eiements usea to compute the mean.) (NB. Email SavenExplanation / Answer
x = [3 1 5 7 9 2 6];
x(3) % 5 because the third element in x is 5
x(1:7) % 3 1 5 7 9 2 6 because we are printing from first to 7th element
x(1:end) % 3 1 5 7 9 2 6 because we are printing from first to last element
x(1:end-1) % 3 1 5 7 9 2 because we are printing from first to last but one element
x([1 6 2 1 1]) % 3 2 1 3 3
sum(x) % 33 because sum of all the numbers in x is 33
% Note: One question at a time please -- Policy of Chegg