Question: Using Array and loop together

Hi, these are what I have, I'm trying tot get a set of answers.

elenum:=16:

nodes:=elenum*2+1:

L:=evalf((Pi*2)/(elenum*2)):

interface(rtablesize=infinity):

E0:=Matrix([[L/3,2*L/3,L/3)],[(2*L/3,11*L/15,2*L/3)],[(L/11,2*L/3,L/110]]):

for i from 1 to elenum do
node:=(2*(i-1))+1;
E0M[node..node+2,node..node+2]:=E0M[node..node+2,node..node+2]+E0
end do:

E0M:

What should I do if i want a different outcome of E0M when I change elenum to 2, 4, 6, 8, 16

I tried using elenum:=Array([2,4,6,8,16]) but i does not work. The loop does not read the array too. Please help. Thanks

Please Wait...