MATLAB Function Reference
  Go to function:
    Search    Help Desk 
rot90    Examples   See Also

Rotate matrix 90°

Syntax

Description

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.

Examples

The matrix

rotated by 90 degrees is

See Also

flipdim     Flip array along a specified dimension

fliplr      Flip matrices left-right

flipud      Flip matrices up-down



[ Previous | Help Desk | Next ]