| MATLAB Function Reference | ![]() |
B = rot90(A)
B = rot90(A,k)
B = rot90(A) rotates matrix A counterclockwise by 90 degrees.
B = rot90(A,k) rotates matrix A counterclockwise by k*90 degrees, where k is an integer.
The matrix
X =
1 2 3
4 5 6
7 8 9rotated by 90 degrees is
Y = rot90(X)
Y =
3 6 9
2 5 8
1 4 7![]() | rosser | rotate | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |