| MATLAB Function Reference | ![]() |
Syntax
B = rot90(A) B = rot90(A,k)
Description
rotates matrix B = rot90(A)
A counterclockwise by 90 degrees.
rotates matrix B = rot90(A,k)
A counterclockwise by k*90 degrees, where k is an integer.
Examples
X =
1 2 3
4 5 6
7 8 9
Y = rot90(X)
Y =
3 6 9
2 5 8
1 4 7
See Also
| rose | rotate | ![]() |