Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rot90

MATLAB rot90 function


Description

Rotates matrix counterclockwise k*90 degrees.

Usage

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)

See Also

Examples

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

matlab

MATLAB emulation package

v1.0.2
Artistic-2.0
Authors
P. Roebuck
Initial release
2014-06-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.