Dispositions with repetitions; dispositions without repetitions; combinations with repetitions.
Show older comments
Good morning,
I use Matlab version 7.9 ; I already know the functions nchoosek(v,k) or combnk(v,k) to generate vectors of k components taking all the possible combinations without repetitions of k components among the n components of the vector v.
Now I need to do the same thing to generate vectors of k components:
- taking all the possible combinations with repetitions of k components among the n components of the vector v;
- taking all the possible dispositions without repetitions of k components among the n components of the vector v;
- taking all the possible dispositions with repetitions of k components among the n components of the vector v.
Are there any functions for doing these things? If not, it is possible to do these things writing a short m-file?
Thank you.
Bussoli Lorenzo (Ph.d student in mathematics at the university of Florence).
3 Comments
Walter Roberson
on 16 Sep 2011
I do not recall hearing "dispositions" used in this context. Could you briefly define it?
Andrei Bobrov
on 16 Sep 2011
may be "permutations"?
Lorenzo
on 20 Sep 2011
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!