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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started