comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » m choose n
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
m choose n [message #67376] Tue, 28 July 2009 16:09 Go to previous message
Rob[2] is currently offline  Rob[2]
Messages: 11
Registered: May 2007
Junior Member
Has anyone implemented the combinatorial function which the "n choose
k" combinations of an input vector, like Matlab's nchoosek? I'm not
talking about just the binomial coefficient n!/(m!*(n-m)!). I'm
interested in getting the "n choose k" combinations. Matlab's
function:

http://www.mathworks.com/access/helpdesk/help/techdoc/index. html?/access/helpdesk/help/techdoc/ref/nchoosek.html&htt p://www.google.com/search?q=matlab+nchoosek&ie=utf-8& ;oe=utf-8&aq=t&rls=org.mozilla:en-US:official&cl ient=firefox-a

Example:
octave-3.0.5:2> nchoosek([1,2,3,4],2)
ans =

1 2
1 3
1 4
2 3
2 4
3 4


If not, I will just codify Matlab/Octave's nchoosek() and submit to
ITT Vis or something like that.

R
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: What in the world does "Program code area full" mean?
Next Topic: River lines out of a DEM with IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:34:30 PDT 2025

Total time taken to generate the page: 0.07921 seconds