MATLAB Answers

Solution Using Jacobi and Gauss Seidel Method.

51 views (last 30 days)
Pranjal Pathak
Pranjal Pathak on 23 Jan 2012
Answered: Meysam Mahooti on 29 Nov 2019
I am facing problem regarding the solution of the foll problem:
W(m+1)(j,k)=Pm(j,k)+Q(j,k)/2*g(j,k) Where: P(j,k)=[W(j+1,k)+W(j-1,k)+W(j,k+1)+W(j,k-1)]/g(j,k) Q(j,k)=Sy(j,k+1)- Sy(j,k-1)+ Sx(j+1,k)-Sy(j-1,k) m=m-th iterations(say 4) g(j,k)={2, if j=1:N or k=1:N 3, if j=1:N or k=2:N-1, k=1:N or j=2:N-1 4 otherwise} N=128
And [X,Y] =meshgrid(-1:2/127:+1,-1:2/127:+1)
Which will give us the Q-matrix
The initial W-matrix is assumed to be a zero matrix having all the elements zero(128x128).
Can anyone help me in solving this problem using 1] Jacobi Method, and 2] Gauss Seidel Method upto a iteration of 4 in MATLAB.

  1 Comment

Walter Roberson
Walter Roberson on 23 Jan 2012

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!