Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with the question that highlighted by using matlab to solve it. The last two pictures are the example of different question. Thank

Please help me with the question that highlighted by using matlab to solve it. The last two pictures are the example of different question. Thank you so much for your help!!!! image text in transcribed
image text in transcribed
image text in transcribed
1. 100 Points) Consider a system of linear equations 0 0 0 0 [-2 1 0 1 -2 1 0 1 -2 0 0 1 ... ... 0 ... 1 0 0 ... ... -2 1 1 -2 1 0 10 ... 0 1 -2 1 0 0 1 -2 79 91 : 99917 0 0 0 ... 0 0 | on stion. Solve the system by Gauss-Seidel method. Solve the system by the SOR with w = 1.7. X jacobi 1. Udubbele. Gaussselael.m Jacobi.m function x=GaussSeidel (A,b,x) n=rank (A); Rmax=Inf; tol=le-5; iter=0; Ewhile Rmax>tol x_old=x E for i=1:n sigma=0; for j=1:1-1 sigma=sigma+A(i,j) *x(j); end for j=i:n sigma=sigma+A(i,j) *x_old (j); end x(i)=x_old (i) + (b(i)-sigma)/A(i, i); R(i)=b (i)-sigma; end Rmax=max (abs (R)); iter=iter+1; end c = ['No.of Iteration=', num2str(iter)]: disp(c); end 1 1 1 JULUDI LINI TUMAMA IMA 1. mx SOR.m function x=SOR (A, b, x,w) n=rank (A); Rmax=Inf; tol=le-5; iter=0; Elwhile Rmax>tol x_oldex for i=1:n sigma=0; for j=1:1-1 sigma=sigma+A(i,j)*x(j); end o I 1 1 1 1 for j=i:n sigma=sigma+A(i,j) *x_old (j); end x(i)=x_old(i) +w* (b(i)-sigma)/A(i,i); R(i)=b (i)-sigma; end Rmax=max (abs (R)); iter=iter+1; end C = ['No.of Iteration=', num2 str(iter)); disp (c); end 1 1 1 m 1 1 1

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

=+3 Which stage are you in? Can you envision the next stage?

Answered: 1 week ago