Question: Code has already been provided to define a function named matrixFun that accepts an input variable A that is a matrix with M rows and
Code has already been provided to define a function named matrixFun that accepts an input variable A that is a matrix with rows and columns of numbers. Add commands
to the function to perform the operations described below and assign the results to the indicated output variable names.
Create a new matrix, that consists of the first and last rows of
Create a new matrix, that consists of the elements at the four corners of
Create a new matrix, that consists of the second through last columns in the second through last rows of
Solve this problem using only vectorized code with no loops. Note the variable is defined as a function input. Do not overwrite the value in your code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
