reshapeで空欄を詰めない方法
Mostra commenti meno recenti
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で固定して、もとの行列の要素が混ざらないようにしたいです。
どのようなコードを書けばよいでしょうか。
よろしくお願いいたします。
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Resizing and Reshaping Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!