ordering a list of number?

let say i have 6 different number(J) 1,2,3,4,5,6, how can i use matlab to arrange all possible oder? eg 2,1,3,4,5,6 . 1,2,4,3,5,6 etc?

 Accepted Answer

doc perms
Gives all the permutations of the vector
c=[1,2,3,4,5,6]
perms(c)

1 Comment

Thanks , i was looking for this as well..

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Asked:

on 2 Apr 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!