How to divide a string into multiple rows
古いコメントを表示
If I have a string e.g.
A= 1 2 3 4 5 6 7 8 9
How can I change that into: [1 2 3;4 5 6;7 8 9]
1 2 3
4 5 6
7 8 9
If I use the reshape command e.g. reshape(A,3,[]) it will turn it into
1 4 7
2 5 8
3 6 9
But I need it to be like: [1 2 3;4 5 6;7 8 9]
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で String についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!