comparison util/classes/@dictionary/plotcumcoherencebounds.m @ 184:8fc38e8df8c6 danieleb

Minor edits
author Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk>
date Fri, 27 Jan 2012 13:18:50 +0000
parents
children
comparison
equal deleted inserted replaced
183:0d7a81655ef2 184:8fc38e8df8c6
1 function plotcumcoherencebounds(obj)
2
3 [d N] = size(obj.phi);
4
5 mu1 = cumcoherence(obj,1);
6 mu2 = cumcoherence(obj,2);
7 mu1_min = (1:d)*sqrt((N-d)/(d*(N-1)));
8
9 figure, subplot(2,1,1)
10 hold on, grid on
11 plot(1:d,mu1,'k-')
12 plot(1:d,mu2,'k--')
13 plot(1:d,mu1_min,'b-.')
14 set(gca,'XScale','log','YScale','log');
15 axis tight
16 ylabel('p-cumulative coherence')
17 xlabel('k')
18 legend('\mu_1(k)','\mu_2(k)','\mu_{1_{min}}(k)')
19
20 % temp = conv(mu1,[1 1]);
21 % kMax = find(temp<1,1,'last');
22 % title(['Worst case bound: k_{max} = ' num2str(kMax)])
23 %
24 % % subplot(2,1,2)
25 % p_BP_fails = exp(-1./(8*mu1(1)^2*(1:d)));
26 % p_TH_fails = exp(-1./(128*mu2.^2));
27 % plot(1:d,p_BP_fails,'k-+');
28 % plot(1:d,p_TH_fails,'k-o');
29 % legend('P(BP fails)','P(TH fails)');
30
31 % % Plot cumulative coherence with lower and upper bounds
32 % mumin = (1:d)*sqrt((N-d)/(d*(N-1)));
33 % mumax = (1:d);
34 % figure,
35 % subplot(1,6,1:2)
36 % hold on, grid on
37 % plot(1,mumax(1),'k-s');
38 % plot(1,mu(1),'ko');
39 % plot(1,mumin(1),'k-d')
40 %
41 %
42 % subplot(1,6,3:6)
43 % hold on, grid on
44 % plot(2:d,mumax(2:end),'k-s');
45 % plot(2:d,mu(2:end),'k-o');
46 % plot(2:d,mumin(2:end),'k-d');
47 % set(gca,'XScale','log','YScale','log');
48 % axis tight
49 % xlabel('k');
50 % ylabel('\mu(k)');
51 % ylim([mumin(1) 10])
52 %
53 % % Plot recovery bounds
54 % plot(2:d,1-mu(1:d-1),'r-o')
55 % plot(2:d,1-mumin(1:d-1)','r-d')
56 % plot([2 d],[1/3 1/3],'b');
57 % legend('\mu_{max}(k)','\mu(k)','\mu_{min}(k)','Exact-Sparse \mu','Exact-Sparse \mu_{min}','Sparse');
58
59
60 % v = conv(mu,[1 1]);
61 % ind = find(v<1, 1, 'last');
62 %
63 % line([ind ind], [min(mu) max(mu)],'Color','red');
64 % title(['Minimum allowed sparsity (Tanner):' num2str(ind/obj.len)]);
65 end