Question: This week's assignment focuses on comparison of solvers for linear systems available in Matlab. Question 1 (15 marks) Let A be an n *

This week's assignment focuses on comparison of solvers for linear systems available

This week's assignment focuses on comparison of solvers for linear systems available in Matlab. Question 1 (15 marks) Let A be an n * n matrix and b a column vector with n entries. Consider solving the linear system Ax = b. If only one vector b is given, then the fastest method for solving the system in Matlab is x=A\b. Note that n is a Matlab operator. However the situation is different if we need to solve many linear systems Ax = b with the same matrix A and different right-hand side vectors b. You will compare the efficiency of the following two methods in case of solving many systems Ax = b with the same matrix A: x =A\b. You can refer to this method as the \built-in solver." Compute the LU decomposition of A = LU. Solve y = L\b and then x = U\y. The Matlab command to compute L and U is lu. Of course, the LU decomposition of A needs to be computed only once. You are going to look at the efficiency (in terms of computation time) of these two methods, using random linear systems of large size. Below are the precise instructions of what needs to be done: We want to consider values of n ranging from n = 100 to n = 1000, with increments of 50. Requirement: use the construction a:b:c to generate this range of values of n and use a for loop to iterate through this range of values of n.

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!