| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
P = perms(v)
P = perms(v) where v is a row vector of length n, creates a matrix whose rows consist of all possible permutations of the n elements of v. The matrix P contains n! rows and n columns.
perms is only practical when n is less than 8 or 9.
perms([2 4 6]) ans = 6 4 2 6 2 4 4 6 2 4 2 6 2 4 6 2 6 4
![]() | perfcurve | permute (categorical) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |