Question: Condition of Jacobi Iteration

Hello, I'm Tam and I had a problem with Conditional of Jacobi Iteration.

So, the proplem is:

>restart;

>with(LinearAlgebra):

A:=Matrix([[5,1,-1],[0,4,2],[-1,2,-7]]);

And I want to check the condition

with the maple program.

Fisrt, I typed

b:=sum(abs('A'[1,j]),j=1..ColumnDimension(A)); and I got b:=7

Then,

c:=2*abs(A[1,1]) - sum(abs('A'[1,j]),j=1..ColumnDimension(A)); and c:=3

So I made a process

>restart;

>with(LinearAlgebra):

>JacobiCondition:= proc(A);
     local MC, i, j, DimA;
     DimA:=ColumnDimension(A);
     i::nonnegint;
     j::nonnegint;
     for i from 1 to DimA do:
        MC:=2*abs('A'[i,i]) - sum(abs('A'[i,j]),j=1..DimA);
     end do;
     if MC:=0 then print("It's Not OK")
        else print("It's OK");
     end if;
end proc;

But it didn't work!

What sould I do to solve this problem.

Thanks so much,

Tam, from Vietnam.

Please Wait...