File Exchange

image thumbnail


version (93.9 KB) by

even, odd, cyclical, unique permutations of a set of vectors

1 Download


View License

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. See also uniqueperms FEX # 18918.

Comments and Ratings (2)

Bill McKeeman

The version of perms has a bug. It sometimes gives the even permutations instead of the odd permutations and vice versa. It has been corrected and reissued as FX32978. This version, FX10237 should soon be deleted.

Rashid Iqbal


can you please teach me about the dmperm function which calculate the permulation of adajancy matrix.
Please explain this function with example.




Updated license


fixed botched submission


license change


Fix problem with R2009a, follow some MLINT advice

The MATLAB perms turns an N-D matrix into a vector before generating permutations. This perms accepts a matrix of input vectors. I added a comment. Also FEX uniqueperms #18918 is faster and less demanding of memory for the cases it handles.

clean up Mlint messages

Clean up HTML documentation

MATLAB Release
MATLAB 7.2 (R2006a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today