Hello,
I've been searching for a function that give all permutations of c elements in 
n, as "combnk" Matlab function.
I fund in this forum 
http://octave.1599824.n4.nabble.com/combinations-td1636272.html a solution 
using "perms" function.
However, "perms" function sets a matrix of prod(2:n) line, which limits the use 
to n=10;

I tried an empiric algorithme, that can replace the use of "unique(sort (perms 
(1:n)(:,1:c), 2), 'rows')"
I am not a mathematician, and not even a programmer, but this code may inspire 
someone for a "clean" code.


Martin

Attachment: perms_mec.m
Description: Binary data

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to