| 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:20 |
|---|
| 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 | title('Second source'); |
|---|
| 27 | set(gca,'XLim',XL); |
|---|
| 28 | set(gca,'YLim',YL); |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | subplot(2,2,4); |
|---|
| 32 | eval(['contour_2(Smp' si '(1,:),Smp' si '(2,:),w' si ')']); |
|---|
| 33 | title('Merged density'); |
|---|
| 34 | set(gca,'XLim',XL); |
|---|
| 35 | set(gca,'YLim',YL); |
|---|
| 36 | |
|---|
| 37 | end |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | itload('../merger_iter_test.it'); |
|---|
| 41 | XG = reshape(Grid(1,:),Npoints,Npoints); |
|---|
| 42 | YG = reshape(Grid(2,:),Npoints,Npoints); |
|---|
| 43 | |
|---|
| 44 | figure(it+2); |
|---|
| 45 | M1 = reshape(exp(Res1),Npoints,Npoints); |
|---|
| 46 | contour(XG,YG,M1,7); |
|---|
| 47 | |
|---|
| 48 | figure(it+3); |
|---|
| 49 | hold off |
|---|
| 50 | mm = max(max(Res2)); |
|---|
| 51 | for i=1:size(Res2,1) |
|---|
| 52 | M2 = reshape(Res2(i,:),Npoints,Npoints); |
|---|
| 53 | contour(XG,YG,M2,[0:mm/7:mm]); |
|---|
| 54 | hold on |
|---|
| 55 | end |
|---|