Question: Please help need done in matlab Create the following functions in MATLAB: function D=inverses(A) which takes as an input an n x n matrix A.
Please help need done in matlabCreate the following functions in MATLAB: function D=inverses(A) which takes as an input an n x n matrix A. First, the function has to determine whether A is invertible (you may want to use the function rank to do that). If A is not invertible, the function has to return an empty matrix D = []; and terminates with a message "Matrix A is not invertible". If A is invertible, then the function reduces the matrix (A eye(n)] into the reduced echelon form and returns the matrix D that is the inverse of the matrix A. You can use a MATLAB built-in function rref for this part. **Type the functions inverses in your diary file. **Run the function D inverses (A) on the given choices of the matrices A in (a)-(d). A = [4 -6 7 -1 0 1 -5 2 -7 11 10 3 -7 9 19 - 1], A = [1 -3 2 -4 -3 9 -6 12 2 -1 4 2 -4 5 -3 7], A = magic (5) A = magic(4). **Run a built-in MATLAB function in on the matrices A for parts (c) and (d). % Write a comment in your diary file why the result obtained by using in function is inaccurate for the matrix in part (d)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
