Question: Trouble with nested loop

 

Hi, I have a 18x18 matrix called Lambda.

I'm trying to get NewLambda which consist of "(Lambda(1,1)-Lambda(2,2))/2", "(Lambda(2,2)-Lambda(3,3))/2", ....,"(Lambda(17,17)-Lambda(18,18))/2".

Here is what I wrote :

for i from 1 to 17 do
for j from 2 to 18 do
NewLambda:=((Lambda(i,i)-Lambda(j,j))/2;
end do
end do

But it doesn't show me the NewLambda. Please help. Thanks

Please Wait...