Mercurial > hg > smallbox
comparison util/classes/@dictionary/cumcoherence.m @ 160:e3035d45d014 danieleb
Added support classes
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Wed, 31 Aug 2011 10:53:10 +0100 |
parents | |
children | 989b7d78e1c8 |
comparison
equal
deleted
inserted
replaced
159:23763c5fbda5 | 160:e3035d45d014 |
---|---|
1 function mu = cumcoherence(obj) | |
2 obj = normalize(obj); | |
3 [M N] = size(obj.phi); | |
4 mu = zeros(M,1); | |
5 for m=1:M | |
6 c = zeros(N); | |
7 for i=1:N | |
8 c(:,i) = abs(obj.phi'*obj.phi(:,i)); | |
9 c(i,i) = 0; | |
10 end | |
11 c = sort(c,'descend'); | |
12 c = c(1:m,:); | |
13 if m==1 | |
14 mu(m) = max(c); | |
15 else | |
16 mu(m) = max(sum(c)); | |
17 end | |
18 end | |
19 end |