MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > An efficient way to generate these indices? 

Subject: An efficient way to generate these indices? From: Greg von Winckel Date: 26 Dec, 2010 12:14:05 Message: 1 of 19 
I'm trying to generate an indexing scheme for nodes on a ddimensional simplex domain. 
Subject: An efficient way to generate these indices? From: John D'Errico Date: 26 Dec, 2010 16:01:05 Message: 2 of 19 
"Greg von Winckel" wrote in message <if7bid$ii2$1@fred.mathworks.com>... 
Subject: An efficient way to generate these indices? From: Greg von Winckel Date: 27 Dec, 2010 11:42:04 Message: 3 of 19 
Thanks for the idea, John. 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 29 Dec, 2010 20:28:05 Message: 4 of 19 
"Greg von Winckel" wrote in message <if9u2c$6o7$1@fred.mathworks.com>... 
Subject: An efficient way to generate these indices? From: Greg von Winckel Date: 1 Jan, 2011 12:42:05 Message: 5 of 19 
> Or a one liner solution: 
Subject: An efficient way to generate these indices? From: Derek O'Connor Date: 1 Jan, 2011 19:14:04 Message: 6 of 19 
"John D'Errico" <woodchips@rochester.rr.com> wrote in message <if7os1$qb5$1@fred.mathworks.com>... 
Subject: An efficient way to generate these indices? From: Greg von Winckel Date: 2 Jan, 2011 00:09:04 Message: 7 of 19 
Now that I can efficiently compute the ordered ntuples, is there and efficient way to determine the all the pairs of ntuples which have an intersection of size n1? 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 2 Jan, 2011 19:05:20 Message: 8 of 19 
"Greg von Winckel" wrote in message <ifofn0$lo3$1@fred.mathworks.com>... 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 2 Jan, 2011 20:35:07 Message: 9 of 19 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 2 Jan, 2011 21:23:05 Message: 10 of 19 
Here is an improved version of the function: 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 3 Jan, 2011 00:00:21 Message: 11 of 19 
A even better version: 
Subject: An efficient way to generate these indices? From: Greg von Winckel Date: 3 Jan, 2011 08:45:19 Message: 12 of 19 
Wow, Bruno! Thanks a ton. You should post publish this one way or another, among other reasons, so that I can cite you. 
Subject: An efficient way to generate these indices? From: Greg von Winckel Date: 3 Jan, 2011 10:15:05 Message: 13 of 19 
One more thing: Is there a way to have choosk() also return which element of each row of c(p(:,1),:) doesn't appear in c(p(:,2),:)? It seems that the nzd function I posted earlier is now the main bottleneck. 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 3 Jan, 2011 11:04:05 Message: 14 of 19 
"Greg von Winckel" wrote in message <ifs7j9$2vh$1@fred.mathworks.com>... 
Subject: An efficient way to generate these indices? From: Greg von Winckel Date: 3 Jan, 2011 11:28:04 Message: 15 of 19 
Very cool implementation. Thanks so much, Bruno. This has greatly reduced the time to construct Fermionic Galerkin matrices. 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 3 Jan, 2011 16:32:20 Message: 16 of 19 
"Greg von Winckel" wrote in message <ifs2av$ofh$1@fred.mathworks.com>... 
Subject: An efficient way to generate these indices? From: Matt Fig Date: 3 Jan, 2011 22:42:04 Message: 17 of 19 
It seems that what you are doing is combinations without replacement. Accordingly, here is another fast suggestion as an alternative to CHOOSEK: 
Subject: An efficient way to generate these indices? From: Bruno Luong Date: 3 Jan, 2011 22:53:06 Message: 18 of 19 
"Matt Fig" wrote in message <iftjbs$i1r$1@fred.mathworks.com>... 
Subject: An efficient way to generate these indices? From: Matt Fig Date: 3 Jan, 2011 23:08:04 Message: 19 of 19 
Good point, I missed that one... 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.