Home > freetb4matlab > specfun > perms.m

perms

PURPOSE ^

%

SYNOPSIS ^

function A = perms (v)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} perms (@var{v})
%
% Generate all permutations of @var{v}, one row per permutation.  The
% result has size @code{factorial (@var{n}) * @var{n}}, where @var{n}
% is the length of @var{v}.
%
% As an example, @code{perms([1, 2, 3])} returns the matrix
% @example
% @group
%   1   2   3
%   2   1   3
%   1   3   2
%   2   3   1
%   3   1   2
%   3   2   1
% @end group
% @end example
% @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