FUNCTION REFERENCE
perms
All permutations.
All permutations.
Syntax
P = perms(v)Returns every permutation of the elements of v, one per row, in reverse
lexicographic order of their positions. Char input gives char rows.
Example
perms([1 2 3]) % 6-by-3, first row [3 2 1]Differences from MATLAB: the table is limited to 8388608 elements.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.