Using matlab, create a user defined function that receives inputas matrix A and for output returns only the first and last rows ofthe matrix.
Ex: A=[1 2 3; 4 5 6; 7 8 9] B=[1 2 3; 7 8 9]
Expert Answer
Answer to Using matlab, create a user defined function that receives input as matrix A and for output returns only the first and l…