Question: Filling an Array

Hey folks I have a question regarding how to fill an Array.

 

Lets say I do this...

 

Array(1..10, [seq(i, i=0..9)]);

 

This produces [0 1 2 3 4 5 6 7 8 9] as output which is fine.

 

Now lets say I want a 2x10 array (2 rows, 10 columns), the top row being the digits 0-9 (as above) and the second row being something else (in this case it is counting the number of times each digit appears in Pi)

 

Is there a way to implement this using only the Array() command?]

 

Just for reference, the way I'm counting the digits in Pi is to first set Digits:=100000 then use...

S := convert(evalf(Pi), string):

Array(1..10, [seq(CountCharacterOccurrences(S, i), i="0".."9")]);

 

Which gives the amount each digit appears in the first 100000 digits of Pi. So the above seq would be my code for the second row of my Array but how do I do this if my Array is of the form Array(1..2, 1..10) and also have the first row be 0 1 2 ... etc?

 

Thanks

Please Wait...