how do I turn the columns and rows in a random matrix?
Mostrar comentarios más antiguos
We have a 4x3 matrix =
[9 11 13;
10 12 14;
11 13 15;
12 14 16]
and we want to turn the columns and rows around so that it will result in
[16 14 12
15 13 11
14 12 10
13 11 9
Who knows how to do this?
Respuesta aceptada
Más respuestas (1)
Andrei Bobrov
el 23 de Mayo de 2017
rot90(your_matrix,2)
Categorías
Más información sobre Mathematics and Optimization 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!