Mercurial > hg > smallbox
view util/SMALL_plot.m @ 2:257c289bf11d
(none)
author | idamnjanovic |
---|---|
date | Fri, 05 Mar 2010 12:23:57 +0000 |
parents | 7750624e0c73 |
children | 33850553b702 |
line wrap: on
line source
function SMALL_plot(SMALL) % Ivan Damnjanovic 2009 % Function gets as input SMALL structure and plots the solution and % reconstructed signal figure; plot(1:length(SMALL.solver.solution), SMALL.solver.solution, 'b'); title(['Coefficients of the reconstructed signal using ', SMALL.solver.name, ' with parameters ', SMALL.solver.param]) xlabel('Coefficient') % Use SMALL.solution to reconstruct the signal. % Plot reconstructed signal against original for i=1:size(SMALL.solver.reconstructed,2) figure; plot(1:length(SMALL.solver.reconstructed(:,i)), SMALL.solver.reconstructed(:,i) ,'b.-', 1:length(SMALL.Problem.signal(:,i)), SMALL.Problem.signal(:,i),'r--'); legend(SMALL.solver.name,'Original signal'); title('Reconstructed and original signals'); end end