source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/BlueCCal/MultiCamSelfCal/MartinecPajdla/utils/combnext.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 557 bytes
Line 
1%combnext Returns the next combination in order of shifting the least left
2%number to the right.
3%
4%  function next=combnext(n, k, com)
5%
6%n and k has the meaning of combination number.
7function next=combnext(n, k, com)
8
9   next=com;
10   move=k; moved=0;
11   while ~moved
12     if next(move) < n-k+move
13       next(move)=next(move)+1;
14       for i=move+1:k
15         next(i)=next(move)+i-move;
16       end
17       moved=1;
18     else
19       if move>1
20         move=move-1;
21       else
22         disp('Error: this code should have never be called');
23       end
24     end
25   end
26
27return
28
Note: See TracBrowser for help on using the repository browser.