Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: nchoosek [Combinatorics]
Replies: 3   Last Post: Nov 28, 2012 9:17 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jerry

Posts: 71
Registered: 6/14/12
nchoosek [Combinatorics]
Posted: Nov 23, 2012 9:34 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,

I am using "nchoosek" to create all possible combinations of four things taken 3 at a time. See below:

nchoosek(['a';'b';'c';'d'],3)
ans =

abc
abd
acd
bcd

However, I would like to modify "nchoosek" or using another function to add following combinations to the above answer.

aaa
bbb
ccc
ddd

Thanks,
Jerry



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.