P = perms(v) returns
a matrix containing all permutations of the elements of vector v in
reverse lexicographic order. Each row of P contains
a different permutation of the n elements in v.
Matrix P has the same data type as v,
and it has n! rows and n columns.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.