How to divide a string into multiple rows
Mostrar comentarios más antiguos
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]
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre String 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!