# Thread: Turn Sequence output into MATRIX

1. ## Turn Sequence output into MATRIX

I have a peice of code that gives me an answer as a sequence of numbers, i would liek to be able to view this sequence as a matrix however.

I have an input N=25, length of sequence and then the sequence is output from x(1):x(25)

i have this piece of code which seems to work, but i need to find a different way of implementing it and need to coem up with a different code, M=5:
y(i,j)=x((i-1)*M+j)

2. Originally Posted by Stylis10
I have a peice of code that gives me an answer as a sequence of numbers, i would liek to be able to view this sequence as a matrix however.

I have an input N=25, length of sequence and then the sequence is output from x(1):x(25)

i have this piece of code which seems to work, but i need to find a different way of implementing it and need to coem up with a different code, M=5:
y(i,j)=x((i-1)*M+j)
Please specify the language and or package.

Unity based arrays => Fortran ??

CB

3. I might have misunderstood but it sounds like you are trying to reshape an array. If you are in matlab,
Code:
help reshape
Elbarto