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@1: idamnjanovic@1: plot(1:length(SMALL.solver.solution), SMALL.solver.solution, 'b'); idamnjanovic@1: title(['Coefficients of the reconstructed signal using ', SMALL.solver.name, ' with parameters ', SMALL.solver.param]) idamnjanovic@1: xlabel('Coefficient') idamnjanovic@1: idamnjanovic@1: % Use SMALL.solution to reconstruct the signal. idamnjanovic@1: idamnjanovic@1: % Plot reconstructed signal against original idamnjanovic@1: idamnjanovic@1: idamnjanovic@1: for i=1:size(SMALL.solver.reconstructed,2) idamnjanovic@1: figure; idamnjanovic@1: plot(1:length(SMALL.solver.reconstructed(:,i)), SMALL.solver.reconstructed(:,i) ,'b.-', 1:length(SMALL.Problem.signal(:,i)), SMALL.Problem.signal(:,i),'r--'); idamnjanovic@1: legend(SMALL.solver.name,'Original signal'); idamnjanovic@1: title('Reconstructed and original signals'); idamnjanovic@1: end idamnjanovic@1: end