MATLAB Function Reference    
rot90

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, fliplr, flipud


  rosser rotate