Reshape matrix whilst maintaining pairs ordering
5 次查看(过去 30 天)
显示 更早的评论
Hi, I have a 2 x 120 matrix which I'm trying to reshape to a 120 x 2 matrix.
To do this I'm using the following code:
y = reshape(y2, 120, 2);
But the code seems to mess up the pairs i.e. the pairs in the original form (2 x 120) are not the same as in the reshaped form (120 x 2).
If anyone could help with how to keep the ordering whilst simply reshaping the matrix that would be great.
Thanks,
Chris
0 个评论
采纳的回答
Star Strider
2018-8-22
It always helps to have an example of the matrix you are starting with, and your intended result.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!