Mercurial > hg > smallbox
comparison util/SMALL_plot.m @ 154:0de08f68256b ivand_dev
ALPS toolbox - Algebraic Pursuit added to smallbox
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Fri, 12 Aug 2011 11:17:47 +0100 |
parents | b17f690df281 |
children |
comparison
equal
deleted
inserted
replaced
153:af307f247ac7 | 154:0de08f68256b |
---|---|
19 m=size(SMALL.solver,2); | 19 m=size(SMALL.solver,2); |
20 n=size(SMALL.solver(1).reconstructed,2)+1; | 20 n=size(SMALL.solver(1).reconstructed,2)+1; |
21 for i =1:m | 21 for i =1:m |
22 | 22 |
23 subplot(m,n, (i-1)*n+1); plot(1:length(SMALL.solver(i).solution), SMALL.solver(i).solution, 'b') | 23 subplot(m,n, (i-1)*n+1); plot(1:length(SMALL.solver(i).solution), SMALL.solver(i).solution, 'b') |
24 title(sprintf('%s(%s) in %.2f s', SMALL.solver(i).name, SMALL.solver(i).param,SMALL.solver(i).time),'Interpreter','none') | 24 title(sprintf('%s in %.2f s', SMALL.solver(i).name, SMALL.solver(i).time),'Interpreter','none') |
25 xlabel('Coefficient') | 25 xlabel('Coefficient') |
26 | 26 |
27 % Plot reconstructed signal against original | 27 % Plot reconstructed signal against original |
28 | 28 |
29 | 29 |
30 for j=2:n | 30 for j=2:n |
31 | 31 |
32 subplot(m,n,(i-1)*n+j); plot(1:length(SMALL.solver(i).reconstructed(:,j-1)), SMALL.solver(i).reconstructed(:,j-1) ,'b.-', 1:length(SMALL.Problem.signal(:,j-1)), SMALL.Problem.signal(:,j-1),'r--') | 32 subplot(m,n,(i-1)*n+j); plot(1:length(SMALL.solver(i).reconstructed(:,j-1)), SMALL.solver(i).reconstructed(:,j-1) ,'b.-', 1:length(SMALL.Problem.signal(:,j-1)), SMALL.Problem.signal(:,j-1),'r--') |
33 %legend(SMALL.solver(i).name,'Original signal',0,'Location','SouthOutside','Interpreter','none'); | 33 %legend(SMALL.solver(i).name,'Original signal',0,'Location','SouthOutside','Interpreter','none'); |
34 title(sprintf('%s(%s) in %.2f s signal %d', SMALL.solver(i).name, SMALL.solver(i).param,SMALL.solver(i).time,n-1),'Interpreter','none') | 34 title(sprintf('%s in %.2f s signal %d', SMALL.solver(i).name, SMALL.solver(i).time,n-1),'Interpreter','none') |
35 end | 35 end |
36 end | 36 end |
37 end | 37 end |