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 all pairwise combinations
Replies: 10   Last Post: Nov 27, 2012 7:46 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 all pairwise combinations
Posted: Nov 26, 2012 11:12 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,

There is a vector

A=['a', 'b', 'c', 'd','e']

I would like to make a square matrix of all paiwise interactions of this vector:


a b c d e
a aa ba ca da ea
b ab bb cb db eb
c ac bc cc dc ec
d ad bd cd dd ed
e ae bd ce de ee

However, nchoosek allow me to create only half of this matrix. Is there any function to make all these possible interactions within "A"?

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.