Question: Use a for loop to solve Ax b using Gaussian elimination (i.e., backslash in MATLAB and the solve function in python) 100 times with 100

 Use a for loop to solve Ax b using Gaussian elimination

Use a for loop to solve Ax b using Gaussian elimination (i.e., backslash in MATLAB and the solve function in python) 100 times with 100 different vec- tors b. Each time through the loop, make a new 3000 x 1 vector b with random entries using the rand function in MATLAB or the np.random.rand function in python. Time your code using tic and toc in MATLAB or time.time() in python to find out how long it takes to solve all 100 systems. You should time the entire loop. For example, in MATLAB you would write

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!