P = perms(v)
| Parameter | Description |
|---|---|
| v | vector. |
| Parameter | Description |
|---|---|
| P | matrix containing all permutations of the elements of v, in reverse lexicographic order. |
perms returns a matrix containing all permutations of the elements of vector v. Each row of P is one permutation; there are factorial(numel(v)) rows, listed in reverse lexicographic order.
perms([1 2 3])
| Version | Description |
|---|---|
| 2.0.0 | initial version |