function [varargout] = permute(varargin)
%PERMUTE Permute array dimensions.
%   B = PERMUTE(A,ORDER) rearranges the dimensions of A so that they
%   are in the order specified by the vector ORDER.  The array produced
%   has the same values as A but the order of the subscripts needed to 
%   access any particular element are rearranged as specified by ORDER.
%   The elements of ORDER must be a rearrangement of the numbers from
%   1 to N.
%
%   PERMUTE and IPERMUTE are a generalization of transpose (.') 
%   for N-D arrays.
%
%   Example:
%      a = rand(1,2,3,4);
%      size(permute(a,[3 2 1 4])) % now it's 3-by-2-by-1-by-4.
%
%   See also IPERMUTE, CIRCSHIFT.

%   Copyright 1984-2004 The MathWorks, Inc.
%   $Revision: 1.15.4.3 $  $Date: 2004/12/06 16:34:10 $
%   Built-in function.

if nargout == 0
  builtin('permute', varargin{:});
else
  [varargout{1:nargout}] = builtin('permute', varargin{:});
end
