Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Numerical Methods With Chemical Engineering Applications

Authors: Kevin D. Dorfman, Prodromos Daoutidis

1st Edition

1107135117, 978-1107135116

More Books

Students also viewed these Databases questions

Question

Apply equivocality to an organization with which you are familiar.

Answered: 1 week ago