# HG changeset patch # User Daniele Barchiesi # Date 1321534915 0 # Node ID 28b20fd46ba7e10d8ad08f63df760ed976afcb9b # Parent 989b7d78e1c8c035f8bc05a8c58ad884d456ff00 debugged diff -r 989b7d78e1c8 -r 28b20fd46ba7 util/classes/@dictionary/cumcoherence.m --- a/util/classes/@dictionary/cumcoherence.m Thu Nov 17 12:55:36 2011 +0000 +++ b/util/classes/@dictionary/cumcoherence.m Thu Nov 17 13:01:55 2011 +0000 @@ -8,7 +8,7 @@ % % OUTPUT % mu: p-cumulative coherence -if ~exist('type','var') || isempty(p), p = 1; end +if ~exist('p','var') || isempty(p), p = 1; end obj = normalize(obj); [M N] = size(obj.phi); @@ -22,9 +22,9 @@ c = sort(c,'descend'); c = c(1:m,:); if m==1 - mu(m) = max(c^(1/p)); + mu(m) = max(c.^(1/p)); else - mu(m) = max(sum(c)^(1/p)); + mu(m) = max(sum(c).^(1/p)); end end end