Borrar filtros
Borrar filtros

how to reshape a matrix to a vector?

1 visualización (últimos 30 días)
sama
sama el 21 de Mayo de 2018
Respondida: sama el 21 de Mayo de 2018
I have a matrix for example [1 2 3; 4 5 6; 7 8 9]. I want to return it to [1 2 3 4 5 6 7 8 9] how can I do that please? Thanks

Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Mayo de 2018
reshape(A.', 1, [])

Más respuestas (1)

sama
sama el 21 de Mayo de 2018
Thanks a lot. I used reshape but totally had forgot about transpose ('). Thank you

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by