annotate util/SMALL_plot.m @ 2:257c289bf11d

(none)
author idamnjanovic
date Fri, 05 Mar 2010 12:23:57 +0000
parents 7750624e0c73
children 33850553b702
rev   line source
idamnjanovic@1 1 function SMALL_plot(SMALL)
idamnjanovic@1 2 % Ivan Damnjanovic 2009
idamnjanovic@1 3 % Function gets as input SMALL structure and plots the solution and
idamnjanovic@1 4 % reconstructed signal
idamnjanovic@1 5
idamnjanovic@1 6 figure;
idamnjanovic@1 7
idamnjanovic@1 8 plot(1:length(SMALL.solver.solution), SMALL.solver.solution, 'b');
idamnjanovic@1 9 title(['Coefficients of the reconstructed signal using ', SMALL.solver.name, ' with parameters ', SMALL.solver.param])
idamnjanovic@1 10 xlabel('Coefficient')
idamnjanovic@1 11
idamnjanovic@1 12 % Use SMALL.solution to reconstruct the signal.
idamnjanovic@1 13
idamnjanovic@1 14 % Plot reconstructed signal against original
idamnjanovic@1 15
idamnjanovic@1 16
idamnjanovic@1 17 for i=1:size(SMALL.solver.reconstructed,2)
idamnjanovic@1 18 figure;
idamnjanovic@1 19 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 20 legend(SMALL.solver.name,'Original signal');
idamnjanovic@1 21 title('Reconstructed and original signals');
idamnjanovic@1 22 end
idamnjanovic@1 23 end