Conversion of an matrix array

 Respuesta aceptada

madhan ravi
madhan ravi el 25 de En. de 2019
reshape(matrix,1,[])

2 comentarios

Note that this will proceed column by column, giving
 
[M(1,1), M(2,1), M(3,1), ... M(50,1), M(1,2), M(2,2), ... ]
This is one of the very fastest operations in MATLAB, as the data is not change: there is just a change to the header saying how to interpret the data.
If you want to proceed row by row,
[M(1,1), M(1,2), M(1,3), ... M(1,50), M(2,1), M(2,2) ....]
then you need
reshape(YourMatrix.', 1, []);
madhan ravi
madhan ravi el 28 de En. de 2019
True sir Walter , thank you!

Iniciar sesión para comentar.

Más respuestas (1)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 25 de En. de 2019

Comentada:

el 28 de En. de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by