Generate permutations of a set of vectors under flag control. The flags are 'all' (n factorial), 'even', 'odd', 'cycles', 'signs'. Combinations can be used. The flag 'unique' will remove duplicate entries. This file is a compatible extension of MATLAB perms(vec) where vec is a row vector. It replaces FEX 10237. See also uniqueperms FEX # 18918.
There was a bug in the earlier version of perms (odd perms were sometimes called even, and vice versa), a fact pointed out by Moritz Häckell. I could not resubmit because I have retired and no longer have permission as the old "me".
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.