Question: Complete using Matlab Generate square (nxn) matrices with random elements and n of 5,50, 100, 150, 200, 400,600, 800, 1000. Measure how long it takes

Complete using Matlab
 Complete using Matlab Generate square (nxn) matrices with random elements and

Generate square (nxn) matrices with random elements and n of 5,50, 100, 150, 200, 400,600, 800, 1000. Measure how long it takes Matlab to calculate the inverse of each matrix by run- ning tic; inv (A); time.needed toc;. Plot the time taken versus matrix size. Plot log time.needed versus log n. How does the calculation time change as n gets bigger? Do a simple linear regression of log(time) as a function of log(n) and report the slope of the regression line. What slope would you expect if the calculation time was proportional to the number of arithmetic operations required to find the matrix inverse

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!