Given
a=[1 2 3 4 5 6 7 8 9]
covert the matrix to one vector
[1 2 3 4 5 6 7 8 9]
Maple Maple reshapes along columns, like Matlab. To get same result as Mathematica, we can transpose the matrix first. To get same result as Matlab, do not transpose.
A:=Matrix([[1,2,3],[4,5,6],[7,8,9]]); v:=ListTools:-Flatten(convert(A,list)); v:=ListTools:-Flatten(convert(A^%T,list));
|
[1, 4, 7, 2, 5, 8, 3, 6, 9] [1, 2, 3, 4, 5, 6, 7, 8, 9] |