The reshape(m,r,c) function reshapes the matrix m to r rows and c columns.
Example
OML
>> m=[1 2 3;4 5 6]
1 2 3
4 5 6
>> reshape(m,3,2)
1 5
4 3
2 6