Conversion of an matrix array
1 次查看(过去 30 天)
显示 更早的评论
How to convert a 50x50 matrix into 1x2500 matrix in matlab?
0 个评论
采纳的回答
madhan ravi
2019-1-25
reshape(matrix,1,[])
2 个评论
Walter Roberson
2019-1-25
Note that this will proceed column by column, giving
[M(1,1), M(2,1), M(3,1), ... M(50,1), M(1,2), M(2,2), ... ]
This is one of the very fastest operations in MATLAB, as the data is not change: there is just a change to the header saying how to interpret the data.
If you want to proceed row by row,
[M(1,1), M(1,2), M(1,3), ... M(1,50), M(2,1), M(2,2) ....]
then you need
reshape(YourMatrix.', 1, []);
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!