Tell me more ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
I'm not sure this is the appropriate place to be asking this question, it seems like it would be better off in a programming forum like stackoverflow. – Tom Oldfield Nov 21 '12 at 16:30
Ah alright, I will ask it over there thank you. – Emily Finnerty Nov 21 '12 at 16:32
@EmilyFinnerty: If you have enough time to solve your problem, why don't you ask it via mapleprimes.com ? :) – Babak S. Nov 21 '12 at 16:56
1  
B:=Array(1..14,1..14,(i,j)->Longlistvalue[(j-1)*14+i]) – acer Nov 21 '12 at 18:31
@acer: Why didn't you write your commend as an answer. I think it is what she wanted here. I voted for your line +1. – Babak S. Nov 24 '12 at 9:08

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.