MATLAB rot90 function

Description

Rotates matrix counterclockwise k*90 degrees.

Usage

1
rot90(A, k=1)

Arguments

A

matrix to be rotated

k

numeric scalar specifying the number of times to rotate (1..4)

Details

Rotating 4 times (360 degrees) returns the original matrix unchanged.

Value

Returns matrix corresponding to argument A having been rotated argument k number of times.

Author(s)

P. Roebuck proebuck@mdanderson.org

See Also

fliplr, flipud

Examples

1
rot90(matrix(1:4, 2, 2))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.