Question: How to write and specify a single value in a series of Matrix?

Hi, here is what I have, I would like to get A[1],A[2],A[3]...A[20] which are 18x18 matrix.
Then I would like to specify certain value for example A[4](2,3), or A[5](1,8) etc.... But there seem to be something wrong with my definition of A[m], I could not write A[m](i,j).
When i type A[4], it does not give me a 18x18 matrix. Please help. Thanks. 

with(LinearAlgebra):
interface(rtablesize=infinity):

lam:=RandomMatrix(18);
M:=RandomMatrix(18);

for m from 1 to 20 do;
A[m]:=Matrix(18);
P[m]:=Matrix(18);
Ct[m]:=add(A[m-i].P[i],i=1..m-1);
Ck[m]:=M.A[m-1]+Ct[m];
for i from 1 to 18 do;
for i from 1 to 18 do;
A[m]:=((Ck[m](i,j))/((lam(i,i)-lam(j,j))-(2*m));  ####how do i rectify the mistake here?####
end do:
end do:
end do:

 

 

Please Wait...