This is a question in Maple. I understand in terms of java that I want a count and an increment but my logic doesn't convert as simply to maple code.
I have an very long list of numbers LIST (196) that I wish to turn into a 14x14 Array but using the convert(LIST,Array) only gives me a 1 dimensional array.
In Maple code, this will give me my first column.
j:=1;
for i from 1 to 14 do
B[i,j]:=Longlistvalue[i];
end do;
It's clear that my second column comes from t=2 and s from 15 to 24 but I'm struggling to put this into a loop.
Surely there is either a loop I can use for this or a maple command that puts the first 14 into the first row (or column) then the next 14 into the next row/column etc?
My most recent attempt gets me
B:=Array(1..14,1..14):
n:=1;
m:=14;
for j from 1 to 14 do
for i from n to m do
B[i,j]:=Longlistvalue[i];
end do;
n:=n+14;
m:=m+14;
end do;
But not it states that my array is out of range (because the s in B[i,j] must be less than 15).
Is there a way to get around this by means of a more efficient loop?