source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/manyrands.m @ 37

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

Added original make3d

File size: 364 bytes
Line 
1function y = manyrands(m,k)
2% Given a matrix, take all k-tuples of the columns.  Then for each row,
3% take the min value.  Then take the average of all these.
4tot = 0.0;
5n = 0;
6for tup = (all_ntuples(k,size(m,2)))'
7    m1 = m(:,tup');
8    if k == 1
9       tot = tot + sum(m1);
10    else
11      tot = tot + sum(min(m1'));
12    end
13    n = n + size(m,1);
14end
15y = tot/n;
Note: See TracBrowser for help on using the repository browser.