source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/manyrands_min.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 426 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function y = manyrands_min(m,k,min_vals) |
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. | |
4 | tot = 0; | |
5 | n = 0; | |
6 | for tup = (all_ntuples(k,size(m,2)))' | |
7 | if k == 1 | |
8 | m1 = m(:,tup); | |
9 | else | |
10 | m1 = (min((m(:,tup'))'))'; | |
11 | end | |
12 | % m1 are values that will be picked. | |
13 | tot = tot + sum(m1 == min_vals); | |
14 | n = n + size(m,1); | |
15 | end | |
16 | y = tot/n; |
Note: See TracBrowser
for help on using the repository browser.