Mercurial > hg > smallbox
view util/classes/@dictionary/cumcoherence.m @ 176:d0645d5fca7d danieleb
added MOCOD dictionary update
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Thu, 17 Nov 2011 11:17:44 +0000 |
parents | e3035d45d014 |
children | 989b7d78e1c8 |
line wrap: on
line source
function mu = cumcoherence(obj) obj = normalize(obj); [M N] = size(obj.phi); mu = zeros(M,1); for m=1:M c = zeros(N); for i=1:N c(:,i) = abs(obj.phi'*obj.phi(:,i)); c(i,i) = 0; end c = sort(c,'descend'); c = c(1:m,:); if m==1 mu(m) = max(c); else mu(m) = max(sum(c)); end end end