Question: 1)Given variable M that is a matrix of size 8x8, assign to variable sub the contents of the first 3 rows & last 4 columns

1)Given variable M that is a matrix of size 8x8, assign to variable sub the contents of the first 3 rows & last 4 columns in M.

function sub = Submatrix1(M)

%change the line below so that variable sub contains the contents of the first 3 rows & last 4 columns of input M

sub = M; end

2) Given variable D that contains a matrix of any size, assign to variable col the contents of the first column in D.

2function col = FirstColumn(D)

%change the line below so that col is assigned the contents of the first column in D col =D;

end

3)Given variable A that contains any vector or matrix, subtract 3 from it, and assign the result to variable B.

function B = Decrement(A) %change the line below so that variable B is assigned the contents of A with 3 subtracted off of each element B = A; end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!