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!