Author Topic: SSOR code in matlab  (Read 671 times)

Offline matl

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
SSOR code in matlab
« on: February 03, 2012, 07:46:41 PM »
I am stuck with ssor's code. i have the following algorithm:
Enter a matrix A;
choose an initial guess x0, a maximum number of iterations N, a value for ! 2 (0; 2), and a tolerance
Tol;
_nd D, representing the diagonal, L, strictly lower triangular, and U, strictly upper triangular parts
of A;
_nd the inverse of the upper triangular matrix (D + ! U);
_nd the inverse of the lower triangular matrix (D + ! L);
set T1 = [D + ! U]1 [! L + (1 ! )D];
set T2 = [D + ! L]1 [! U + (1 ! )D];
set T = T1T2;
set c = ! (2 ! ) [D + ! U]1 [D + ! L]1 b;
set k = 0;
while k _ N;
set x(k+1) = T x(k) + c;
if jjx(k+1) x(k)jj1 _ Tol, then k = N + 1;
end;
Display x(k+1).
 
can someone show me how to code this please. thanks

Matlab and SimuLink Development Forum

SSOR code in matlab
« on: February 03, 2012, 07:46:41 PM »