powered by
Rotates matrix counterclockwise k*90 degrees.
k*90
rot90(A, k=1)
Returns matrix corresponding to argument A having been rotated argument k number of times.
A
k
matrix to be rotated
numeric scalar specifying the number of times to rotate (1..4)
P. Roebuck proebuck1701@gmail.com
Rotating 4 times (360 degrees) returns the original matrix unchanged.
fliplr, flipud
fliplr
flipud
rot90(matrix(1:4, 2, 2))
Run the code above in your browser using DataLab