Mercurial > hg > smallbox
view util/classes/@dictionary/plotcumcoherence.m @ 170:68fb71aa5339 danieleb
Added dictionary decorrelation functions and test script for Letters paper.
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Thu, 06 Oct 2011 14:33:41 +0100 |
parents | e3035d45d014 |
children |
line wrap: on
line source
function plotcumcoherence(obj,mu) if ~exist('mu','var') || isempty(mu), mu = cumcoherence(obj); end [d N] = size(obj.phi); % Plot cumulative coherence with lower and upper bounds mumin = (1:d)*sqrt((N-d)/(d*(N-1))); mumax = (1:d); figure, subplot(1,6,1:2) hold on, grid on plot(1,mumax(1),'k-s'); plot(1,mu(1),'ko'); plot(1,mumin(1),'k-d') set(gca,'XScale','log','YScale','log'); axis tight ylabel('\mu'); ylim([mumin(1) 10]) subplot(1,6,3:6) hold on, grid on plot(2:d,mumax(2:end),'k-s'); plot(2:d,mu(2:end),'k-o'); plot(2:d,mumin(2:end),'k-d'); set(gca,'XScale','log','YScale','log'); axis tight xlabel('k'); ylabel('\mu(k)'); ylim([mumin(1) 10]) % Plot recovery bounds plot(2:d,1-mu(1:d-1),'r-o') plot(2:d,1-mumin(1:d-1)','r-d') plot([2 d],[1/3 1/3],'b'); legend('\mu_{max}(k)','\mu(k)','\mu_{min}(k)','Exact-Sparse \mu','Exact-Sparse \mu_{min}','Sparse'); % v = conv(mu,[1 1]); % ind = find(v<1, 1, 'last'); % % line([ind ind], [min(mu) max(mu)],'Color','red'); % title(['Minimum allowed sparsity (Tanner):' num2str(ind/obj.len)]); end