How can i flip a (M x N) matrix to (N x M)?

44 visualizaciones (últimos 30 días)
Alex Brown
Alex Brown el 5 de Jul. de 2017
Editada: Astik Sachan el 5 de Jul. de 2017
i want to reverse the columns and lines in a matrix how can i do it?

Respuesta aceptada

Astik Sachan
Astik Sachan el 5 de Jul. de 2017
Editada: Astik Sachan el 5 de Jul. de 2017
There are two ways to do it:-
A = [1 ,2 ; 3, 4] ;
Flipped_A = transpose(A) ;
2. Put a single-quote to the end of variable
A = [1 ,2 ; 3, 4] ;
Flipped_A = A' ;

Más respuestas (1)

Torsten
Torsten el 5 de Jul. de 2017
https://de.mathworks.com/help/matlab/ref/transpose.html
Best wishes
Torsten.

Categorías

Más información sobre Cell Arrays 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