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!