customizing the index of reshape A 2X2 matrix

1 次查看(过去 30 天)
So I have a 2x2 matrix
test=[1 2;16 9]
y=reshape(test,[],1)
which returns
1
16
2
9
I want it to reshape like this
1
2
16
9
Any suggestion would be highly appreciated.

采纳的回答

madhan ravi
madhan ravi 2020-9-6
Transpose Test before reshaping.
  2 个评论
ali akbar
ali akbar 2020-9-6
Thank you madhan. I just realized how naive I was, I haven't thought about this simple thing beforehand.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by