How can I convert an array to a matrix?
Mostrar comentarios más antiguos
I have an array like B=[2 3 1 5 2 8 1 7 9 1 5 2 4 6 3 9 3 1 7 0 7 2 8 6].
I need this elements in a matrix called A like
A=
2 3 1 5 2 8 1 7
9 1 5 2 4 6 3 9
3 1 7 0 7 2 8 6
Please help...
Respuesta aceptada
Más respuestas (2)
Andreas Goser
el 29 de En. de 2013
0 votos
In MATLAB all arrays are matrices... You may achieve what you need by using the RESHAPE command.
Martin
el 29 de En. de 2013
0 votos
As Jose mentioned the reshape function is a really good one. The help file on that one is really useful for explaining how it works.
Categorías
Más información sobre Logical 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!