reshapeで空欄を詰めない方法
显示 更早的评论
reshape関数を使って行列変換をしたいです。
データが膨大なので簡単な数字で代用すると、
1 3 2 1 3 2 3 4
2 2 4 2 1 5 3 2
2 3 4 5 6 5 3 4
という3×8の行列を
1 3 2
1 3 2
3 4
2 2 4
2 1 5
3 2
2 3 4
5 6 5
3 4
のように列数を3で固定して、もとの行列の要素が混ざらないようにしたいです。
どのようなコードを書けばよいでしょうか。
よろしくお願いいたします。
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!