行列の形状変更をうまく表現できません
Mostrar comentarios más antiguos
例えば次のような行列Aがあるとします.
A =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
このとき,形状変更をして以下のような行列Bとしたいです.
B =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
”配列の形状変更”を参考にreshapeを試しましたが以下のようになりました.
>> B = reshape (A,[1,3*5])
B =
1 6 11 2 7 12 3 8 13 4 9 14 5 10 15
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre 行列および配列 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!