Write a well-commented MATLAB function named MTAROI Dyinvcheck that generates a random matrix (normally distributed), calculates its inverse (inv(A)), multiplies the two matrices back together, and calculates the residual (difference from the desired identity matrix eye(n)). The function should return the residual.
Write a well-commented MATLAB script program named JWIAL that calls Dyinvcheck for n = 10, 20, 40, and 210. The program should record the results of each trial and plot the error versus n using a logarithmic plot (loglog). (See help loglog for more information on how to create a logarithmic plot).
What happens when the error gets big?
Please turn in a printout of the programs, the plot, and a very brief report on the results of your experiments.