Question: matrix index out of range

restart;

A:= Matrix();

A := Matrix(1, 0, {})

(1)

i_choices:= [seq(i,i=0..10,1)];

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

(2)

j_choices:= [seq(j,j=0..10,1)];

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

(3)

for i in i_choices do:
 for j in j_choices do:
   A[i,j] :=i+j;
   print(A[i,j]);
 od:
od;

Error, Matrix index out of range

 

Download test_Matrix.mw

Please Wait...