Question: Exercise 1.1.14 please. Thank you. Exercise 1.1.14 Modify the MATLAB code from Exercise 1.1.9 by changing the matrix-vector multiply b = A*x to a matrix-matrix

Exercise 1.1.14 please. Thank you.  Exercise 1.1.14 please. Thank you. Exercise 1.1.14 Modify the MATLAB code
from Exercise 1.1.9 by changing the matrix-vector multiply b = A*x to

Exercise 1.1.14 Modify the MATLAB code from Exercise 1.1.9 by changing the matrix-vector multiply b = A*x to a matrix-matrix multiply B-A"X, where Xisnxn. You may also want to decrease the initial matrix dimension n and the number of times rep loop is executed. Run the code and check the ratios. Are they close to what you would expect therm to be. based on the flop count? Exercise 1.1.9 Consider the following simple MATLAB program. n 500 for jay = 1:4 if jay > 1 oldtime = time ; end A randn (n) ; x = randn (n, 1) ; t cputime; for rep-1:100 % compute the product 100 times end matrixsize = n time = cputime - t if jay > 1 ratio- time/oldtime end n-2-n; end The syntax is simple enough that you can readily figure out what the program does The commands randn and b = A*x are familiar fromthe previous exercise, we perform each matrix-vector multiplication 100 times in order to build up a significant amount of computing time. The function cputime tells how much computer (central processing unit) time the current MATLAB session has used. This program times the execution of 100 matrix-vector multiplications for square matrices A of dimension 500, 1000, 2000, and 4000

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!