Question: Creating a list of Matrices

I need to create a list of matrices.


with(LinearAlgebra):
interface(rtablesize=50);
E:=[E1,E2,E3]:
P:=[0,1,2]:
N:=3:
B:=[1,2,3]:
for b from 1 to 12 by 5 do
B:=(i,j)->
if i=b+P[a] and j=b+P[a] then E[a]
elif i=b+P[a] and j=b+N+2+P[a] then -E[a]
elif i=b+P[a]+N+2 and j=b+P[a] then -E[a]
elif i=b+P[a]+N+2 and j=b+P[a]+N+2 then E[a]
else 0:
end if:
B[b]:=add(i,i=[seq(Matrix(20,B), a=1..3)]);
end do;
H:=[seq(B[b],b=1..12,5)];

It isn't indexing the first and second variable, only the last one was indexed. 

Please Wait...