Question: Consider the linear system of equations Ax=b, where A Rx, xERx1, and b Rx. [2+d -1 -1 0 0 -1 0 -1 -1 2+d

Consider the linear system of equations Ax=b, where A  R

Consider the linear system of equations Ax=b, where A R"x", xER"x1, and b Rx. [2+d -1 -1 0 0 -1 0 -1 -1 2+d --0 b h = 0.1 and d = 1. Write a MATLAB program to solve the linear system Ax = b for n = methods: 10 and n = 10 with the following Gauss Siedel iterations. Use the convergence criterion of r()|| < 10-6. Plot the convergence history (residual versus iterations) of both methods in one figure and legend accordingly. Use semilogy for your plots. Explain your results. You can generate the above matrix in MATLAB using A = full (gallery ('tridiag', n, -1, 2+d, -1) /h). Consider the linear system of equations Ax=b, where A R"x", xER"x1, and b Rx. [2+d -1 -1 0 0 -1 0 -1 -1 2+d --0 b h = 0.1 and d = 1. Write a MATLAB program to solve the linear system Ax = b for n = methods: 10 and n = 10 with the following Gauss Siedel iterations. Use the convergence criterion of r()|| < 10-6. Plot the convergence history (residual versus iterations) of both methods in one figure and legend accordingly. Use semilogy for your plots. Explain your results. You can generate the above matrix in MATLAB using A = full (gallery ('tridiag', n, -1, 2+d, -1) /h).

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly You are tasked with solving the linear system of equations Ax b using GaussSeidel iterations in MATLAB for two different sizes of the matrix ... View full answer

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 Programming Questions!