Question: need MATLAB code of both probems asap Problem 3. (60 points) (a) Generate a random dense symmetric strictly diagonally dominant matrix A of size n

 need MATLAB code of both probems asap Problem 3. (60 points)

need MATLAB code of both probems asap

Problem 3. (60 points) (a) Generate a random dense symmetric strictly diagonally dominant matrix A of size n = 10, 100, 500, 1000; One way to construct such matrix is A = rand(n); A = A + A' +n* eyes(n); (b) Apply Jocobi, Gauss-Seidel methods (code from textbook); and peg, gmres and mldivide methods (matlab built in); Use tol=10-7, 10 = zeros(n,1), and b=rand(n,1). (c) Tabulate your CPU time for all n. Indicate if any scheme fails. (d) What happens for general matrix A? (A=rand(n).) Bonus Problem (20 points) Write your own code of Gauss elimination (without pivoting). Test your code with the same matrix A and b above (with n= 10,100), compare CPU time. Problem 3. (60 points) (a) Generate a random dense symmetric strictly diagonally dominant matrix A of size n = 10, 100, 500, 1000; One way to construct such matrix is A = rand(n); A = A + A' +n* eyes(n); (b) Apply Jocobi, Gauss-Seidel methods (code from textbook); and peg, gmres and mldivide methods (matlab built in); Use tol=10-7, 10 = zeros(n,1), and b=rand(n,1). (c) Tabulate your CPU time for all n. Indicate if any scheme fails. (d) What happens for general matrix A? (A=rand(n).) Bonus Problem (20 points) Write your own code of Gauss elimination (without pivoting). Test your code with the same matrix A and b above (with n= 10,100), compare CPU time

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!