Question: Create a program in Matlab that in a loop generates 300 fandom matrices, each of size 800x 800, and times the calculation of the inverse
Create a program in Matlab that in a loop generates 300 fandom matrices, each of size 800x 800, and times the calculation of the inverse of each matrix. Use the Matlab function 'inv' to perform the inverse matrix calculation. Use the, 'tic' and 'toc' Matlab commands to measure the time needed to obtain the inverse matrix. Deliverables: . Include your code listing in the report. . Plot histogram (use function 'hist' and set the number of bins to 10) of the obtained run-times. . Calculate 95% confidence interval for estimation of the mean run-time of the inverse matrix function. Show all your workings. Discuss the obtained results. Now modify your program in a way that the size of the matrix varies randomly between the size of 500 x 500 up to size 1000 x 1000. Generate 300 matrices and for each matrix again measure the run-time to calculate its inverse. Deliverables: . Give the scatter plot of the matrix size versus the run-time. . Calculate the sample correlation coefficient between the size of the matrix and the run-time. Show all your workings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
