annotate util/SMALL_plot.m @ 8:33850553b702

(none)
author idamnjanovic
date Mon, 22 Mar 2010 10:56:54 +0000
parents 7750624e0c73
children fc395272d53e
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@8 7
idamnjanovic@8 8 m=size(SMALL.solver,2);
idamnjanovic@8 9 n=size(SMALL.solver(1).reconstructed,2)+1;
idamnjanovic@8 10 for i =1:m
idamnjanovic@8 11
idamnjanovic@8 12 subplot(m,n, (i-1)*n+1); plot(1:length(SMALL.solver(i).solution), SMALL.solver(i).solution, 'b')
idamnjanovic@8 13 title([ SMALL.solver(i).name,'(', SMALL.solver(i).param,')'])
idamnjanovic@1 14 xlabel('Coefficient')
idamnjanovic@1 15
idamnjanovic@1 16 % Plot reconstructed signal against original
idamnjanovic@1 17
idamnjanovic@1 18
idamnjanovic@8 19 for j=2:n
idamnjanovic@8 20
idamnjanovic@8 21 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 22 %legend(SMALL.solver(i).name,'Original signal',0);
idamnjanovic@1 23 title('Reconstructed and original signals');
idamnjanovic@1 24 end
idamnjanovic@1 25 end