Question: 8.1 Enter the matrix M by > M = [1,3,-1,6;2,4,0,-1;0,-2,3,-1; -1,2,-5,1] and also the matrix [ -1 -3 1 2 -1 31 6 N =
![8.1 Enter the matrix M by > M = [1,3,-1,6;2,4,0,-1;0,-2,3,-1; -1,2,-5,1]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f0ea9ea87a6_73466f0ea9e6957a.jpg)
8.1 Enter the matrix M by > M = [1,3,-1,6;2,4,0,-1;0,-2,3,-1; -1,2,-5,1] and also the matrix [ -1 -3 1 2 -1 31 6 N = 1 4 -1 1 2 -1 2] Multiply M and N using M * N. Can the order of multiplication be switched? Why or why not? Try it to see how MATLAB reacts. 8.2 By hand, calculate Av, AB, and BA for: 1 7 co A= 2 -2 -1 4 1 -1 -1 9 0 B= 0 1 -1 -1 0 -2 -1 2 0 v= -1 8.3 Check the results using MATLAB. Think about how fast computers are. Turn in your hand work. (a) Write a well-commented MATLAB function program myinvcheck that makes a n x n random matrix (normally distributed, A = randn(n,n)), calculates its inverse (B = inv(A)), multiplies the two back together, calculates the residual (difference between B and eye(n)), and returns the scalar residual (norm of the difference). (b) Write a well-commented MATLAB script program myinvcheckplot that calls myinvcheck for n = 10, 20,40,..., 2'10 for some moderate i, records the results of each trial, and plots the scalar residual versus n using a log plot. (See help loglog.) What happens to the scalar residual as n gets big? Turn in the programs, the plot, and a very brief report on the results of your experiments. (Do not include any large random matrices.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
