1 | itload('../merger_debug.it'); |
---|
2 | |
---|
3 | ndat = 1000; % check if true! |
---|
4 | |
---|
5 | XL = [-1 4]; |
---|
6 | YL= XL; |
---|
7 | |
---|
8 | figure(1); |
---|
9 | for it=0:4 |
---|
10 | figure(it+1) |
---|
11 | subplot(2,2,1); |
---|
12 | si = num2str(it); |
---|
13 | eval(['contour_2(Smp' si '(1,:),Smp' si '(2,:),exp(Mpdf' si '))']); |
---|
14 | title('Proposal density '); |
---|
15 | set(gca,'XLim',XL); |
---|
16 | set(gca,'YLim',YL); |
---|
17 | |
---|
18 | subplot(2,2,2); |
---|
19 | eval(['contour_2(Smp' si '(1,:),Smp' si '(2,:),exp(lW' si '(1,:)))']); |
---|
20 | title('First source'); |
---|
21 | set(gca,'XLim',XL); |
---|
22 | set(gca,'YLim',YL); |
---|
23 | |
---|
24 | subplot(2,2,3); |
---|
25 | eval(['contour_2(Smp' si '(1,:),Smp' si '(2,:),exp(lW' si '(2,:)))']); |
---|
26 | %eval(['contour_2(Smp' si '(1,:),Smp' si '(2,:),exp(lw_cond' si '))']); |
---|
27 | title('Second source'); |
---|
28 | set(gca,'XLim',XL); |
---|
29 | set(gca,'YLim',YL); |
---|
30 | |
---|
31 | |
---|
32 | subplot(2,2,4); |
---|
33 | hold off |
---|
34 | eval(['contour_2(Smp' si '(1,:),Smp' si '(2,:),w' si ','':'')']); |
---|
35 | title('Merged density'); |
---|
36 | set(gca,'XLim',XL); |
---|
37 | set(gca,'YLim',YL); |
---|
38 | hold on |
---|
39 | eval(['contour_2(Smp' si '(1,:),Smp' si '(2,:),w_is_' si ')']); |
---|
40 | |
---|
41 | end |
---|
42 | |
---|
43 | |
---|
44 | itload('../merger_iter_test.it'); |
---|
45 | XG = reshape(Grid(1,:),Npoints,Npoints); |
---|
46 | YG = reshape(Grid(2,:),Npoints,Npoints); |
---|
47 | |
---|
48 | figure(it+2); |
---|
49 | M1 = reshape(exp(Res1),Npoints,Npoints); |
---|
50 | contour(XG,YG,M1,7); |
---|
51 | |
---|
52 | figure(it+3); |
---|
53 | hold off |
---|
54 | mm = max(max(Res2)); |
---|
55 | for i=1:size(Res2,1) |
---|
56 | M2 = reshape(Res2(i,:),Npoints,Npoints); |
---|
57 | contour(XG,YG,M2,[0:mm/7:mm]); |
---|
58 | hold on |
---|
59 | end |
---|