perms
- :
p =perms(v)¶ All permutations of the elements of vector v (MATLAB R2026a order).
Returns a matrix with
factorial (numel (v))rows. Row order matches MATLAB’s recursive construction (last element first as the leading column block). Empty input yields a1-by-0result. Character inputs keep classchar.