<< rem Other umaxbert >>

Time Frequency Toolbox >> Time Frequency Toolbox > Other > rot90

rot90

rotates the given 2-D array by 90 degrees.

Calling Sequence

y = rot90 (x, k)

Parameters

x :

a 2D array.

k :

an integer which specifies how many 90-degree rotations are to be applied.

Description

Return a copy of x with the elements rotated counterclockwise in 90-degree increments. The second argument is optional, and specifies how many 90-degree rotations are to be applied (the default value is 1). Negative values of k rotate the matrix in a clockwise direction.

Examples

A=[1 2 3
4 5 6
7 8 9];
rot90(A) //counterclockwise
rot90(A,-1)//clockwise

Report an issue
<< rem Other umaxbert >>