Path: news.mathworks.com!not-for-mail
From: "Daniel " <danielDOTrDOTlittle@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Number of unique combinations from sets
Date: Wed, 7 May 2008 06:14:07 +0000 (UTC)
Organization: University of Western Australia
Lines: 20
Message-ID: <fvrhbf$da1$1@fred.mathworks.com>
References: <fvr755$inh$1@fred.mathworks.com> <fvr8v7$h82$1@fred.mathworks.com> <fvrc2j$rtm$1@fred.mathworks.com> <fvrfo5$l1l$1@fred.mathworks.com>
Reply-To: "Daniel " <danielDOTrDOTlittle@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210140847 13633 172.30.248.38 (7 May 2008 06:14:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 7 May 2008 06:14:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 740978
Xref: news.mathworks.com comp.soft-sys.matlab:467092


"helper " <spamless@nospam.com> wrote in message
<fvrfo5$l1l$1@fred.mathworks.com>...
> "Daniel " <danielDOTrDOTlittle@gmail.com> wrote in message 
> <fvrc2j$rtm$1@fred.mathworks.com>...
> 
> OK.  I guess you might want all combinations but where 
> order is unimportant.  Playing with ALLCOMB, it is much 
> better than COMBSREP.  Here is a quick adjustment you can 
> make to the output of ALLCOMB to obtain what you are 
> looking for:
> 
> tic
> a = unique(sort(allcomb(1:900,1:900),2),'rows');
> toc
> Elapsed time is 0.927414 seconds.
> 


Thanks so much. I didn't think to sort the columns first
before calling unique. Good stuff.