|
Contents | Previous | Next | Subchapters |
| Syntax |
rot90(x, n) |
| See Also | flipud , fliplr , transpose |
90 degrees
in the counterclockwise direction where n is a scalar
and equal to an integer.
The default value for n is one.
A single rotation by 90 degrees is the same as reversing
the order of the elements in each row and then transposing the matrix; i.e.,
rot90(x) = x(end : -1 : 1, :)'
Values of n greater than zero result in the specified number of
rotations by 90 degrees.
Values of n less than zero correspond to the inverse
mapping for the corresponding absolute value of n.
x = { ...
[ 5 , 3 , 1 ], ...
[ 6 , 4 , 2 ] ...
}
rot90(x)
O-Matrix will respond
{
[ 1 , 2 ], ...
[ 3 , 4 ], ...
[ 5 , 6 ] ...
}