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 34 5 67 8 9
Y = rot90(X)Y =3 6 92 5 81 4 7
fliplr,flipud,reshape
(c) Copyright 1994 by The MathWorks, Inc.