Home > freetb4matlab > general > rotdim.m

rotdim

PURPOSE ^

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

SYNOPSIS ^

function y = rotdim (x, k, plane)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} rotdim (@var{x}, @var{n}, @var{plane})
% 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).
% The third argument is also optional and defines the plane of the
% rotation.  As such @var{plane} is a two element vector containing two
% different valid dimensions of the matrix.  If @var{plane} is not given
% Then the first two non-singleton dimensions are used.
%
% Negative values of @var{n} rotate the matrix in a clockwise direction.
% For example,
%
% @example
% @group
% rotdim ([1, 2; 3, 4], -1, [1, 2])
%      @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
% rotdim ([1, 2; 3, 4], -1, [1, 2])
% rotdim ([1, 2; 3, 4], 3, [1, 2])
% rotdim ([1, 2; 3, 4], 7, [1, 2])
% @end group
% @end example
% @seealso{rot90, 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