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 ]
Nasser Abbasi

Posts: 5,673
Registered: 2/7/05
Re: nchoosek all pairwise combinations
Posted: Nov 27, 2012 4:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 11/27/2012 3:40 AM, Jos (10584) wrote:

> A very easy way to obtain the interactions would be using NDGRID
>
> A = 'abcde'
> [B1, B2] = ndgrid(A)
>
> which stores the interactions in two separate yet related matrices ...
> It all depends on what you want to do with the result!
>
> ~ Jos
>


Yes, good, but the problem is that the result are
all one long string now (in B1 and B2) and there will need to be much more
work done to go from those to the final result the OP wanted,
which is a cell matrix of only 2 chars/per string in each entry.

--Nasser






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.