Question: 1. Write a MATLAB function named determinant to find the determinant of a 3 x 3 matrix using a subfunction to calculate each 2 x
1. Write a MATLAB function named "determinant" to find the determinant of a 3 x 3 matrix using a subfunction to calculate each 2 x 2 matrix within as shown below. Begin your function by checking that the matrix is square. If it is not, display an error message "matrix must be square." You may use the built-in command "det0" to check your work, but you may not use it in your function. To get started, identify the following: Inputs to function: Function will return: First line of function 2. Upload the following to Moodle: (a) A MATLAB (*.m) file which calculates the determinant for any m x n square matrix. (b) A screen shot of your program running
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
