perms
All possible permutations
Syntax
Description
P = perms( returns a matrix containing all permutations of the elements of vector v)v. Each row of
P contains a different permutation of the
n elements in v. Matrix
P has the same data type as v, and it has
n! rows and n columns.
Examples
Input Arguments
Limitations
perms(v) is practical when length(v) is
less than about 10.
More About
Extended Capabilities
Version History
Introduced before R2006a
See Also
nchoosek | permute | randperm | combinations