<< moc_range Matlab/Octave Compatibility toolbox moc_rows >>

Matlab/Octave Compatibility toolbox >> Matlab/Octave Compatibility toolbox > moc_rot90

moc_rot90

rotates the given matrix clockwise by 90 degrees.

Calling Sequence

y = moc_rot90 (x, k)

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 n rotate the matrix in a clockwise direction.

Examples

moc_rot90 ([1, 2; 3, 4], -1)

Authors


Report an issue
<< moc_range Matlab/Octave Compatibility toolbox moc_rows >>