B = rot90(A)
B = rot90(A,k)
B
=
rot90(A)
rotates the matrix A
counterclockwise by 90 degrees.
B
=
rot90(A,k)
rotates the matrix A
counterclockwise by k*90
degrees. k
must be an integer.
rotated by 90 degrees isX =
1 2 3
4 5 6
7 8 9
Y = rot90(X)
Y =
3 6 9
2 5 8
1 4 7
fliplr
,flipud
,reshape
(c) Copyright 1994 by The MathWorks, Inc.