idamnjanovic@1: function SMALL_plot(SMALL) idamnjanovic@1: % Ivan Damnjanovic 2009 idamnjanovic@1: % Function gets as input SMALL structure and plots the solution and idamnjanovic@1: % reconstructed signal idamnjanovic@1: idamnjanovic@1: figure; idamnjanovic@8: idamnjanovic@8: m=size(SMALL.solver,2); idamnjanovic@8: n=size(SMALL.solver(1).reconstructed,2)+1; idamnjanovic@8: for i =1:m idamnjanovic@8: idamnjanovic@8: subplot(m,n, (i-1)*n+1); plot(1:length(SMALL.solver(i).solution), SMALL.solver(i).solution, 'b') idamnjanovic@8: title([ SMALL.solver(i).name,'(', SMALL.solver(i).param,')']) idamnjanovic@1: xlabel('Coefficient') idamnjanovic@1: idamnjanovic@1: % Plot reconstructed signal against original idamnjanovic@1: idamnjanovic@1: idamnjanovic@8: for j=2:n idamnjanovic@8: idamnjanovic@8: 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--') idamnjanovic@8: %legend(SMALL.solver(i).name,'Original signal',0); idamnjanovic@1: title('Reconstructed and original signals'); idamnjanovic@1: end idamnjanovic@1: end