Home > freetb4matlab > general > rot90.m

rot90

PURPOSE ^

% Return a copy of @var{x} with the elements rotated counterclockwise in

SYNOPSIS ^

function y = rot90 (x, k)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} rot90 (@var{x}, @var{n})
% Return a copy of @var{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 @var{n} rotate the matrix in a clockwise direction.
% For example,
%
% @example
% @group
% rot90 ([1, 2; 3, 4], -1)
%      @result{}  3  1
%          4  2
% @end group
% @end example
%
% @noindent
% rotates the given matrix clockwise by 90 degrees.  The following are all
% equivalent statements:
%
% @example
% @group
% rot90 ([1, 2; 3, 4], -1)
% rot90 ([1, 2; 3, 4], 3)
% rot90 ([1, 2; 3, 4], 7)
% @end group
% @end example
%
% Due to the difficulty of defining an axis about which to rotate the 
% matrix @code{rot90} only work with 2-D arrays.  To rotate N-d arrays
% use @code{rotdim} instead.
% @seealso{rotdim, flipud, fliplr, flipdim}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003