annotate util/SMALL_plot.m @ 130:037bb7da3703 ivand_dev

changing names of two functions to be consistent with others
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Mon, 13 Jun 2011 15:04:06 +0100
parents 8e660fd14774
children b17f690df281
rev   line source
idamnjanovic@1 1 function SMALL_plot(SMALL)
ivan@128 2 %% Plots coefficients and reconstructed signals
ivan@128 3 % Function gets as input SMALL structure and plots the solution and
ivan@128 4 % reconstructed signal
ivan@128 5
idamnjanovic@24 6 %
idamnjanovic@24 7 % Centre for Digital Music, Queen Mary, University of London.
idamnjanovic@24 8 % This file copyright 2009 Ivan Damnjanovic.
idamnjanovic@24 9 %
idamnjanovic@24 10 % This program is free software; you can redistribute it and/or
idamnjanovic@24 11 % modify it under the terms of the GNU General Public License as
idamnjanovic@24 12 % published by the Free Software Foundation; either version 2 of the
idamnjanovic@24 13 % License, or (at your option) any later version. See the file
idamnjanovic@24 14 % COPYING included with this distribution for more information.
ivan@128 15 %%
idamnjanovic@1 16
idamnjanovic@1 17 figure;
idamnjanovic@8 18
idamnjanovic@8 19 m=size(SMALL.solver,2);
idamnjanovic@8 20 n=size(SMALL.solver(1).reconstructed,2)+1;
idamnjanovic@8 21 for i =1:m
idamnjanovic@8 22
idamnjanovic@8 23 subplot(m,n, (i-1)*n+1); plot(1:length(SMALL.solver(i).solution), SMALL.solver(i).solution, 'b')
ivan@77 24 title(sprintf('%s(%s) in %.2f s', SMALL.solver(i).name, SMALL.solver(i).param,SMALL.solver(i).time),'Interpreter','none')
idamnjanovic@1 25 xlabel('Coefficient')
idamnjanovic@1 26
idamnjanovic@1 27 % Plot reconstructed signal against original
idamnjanovic@1 28
idamnjanovic@1 29
idamnjanovic@8 30 for j=2:n
idamnjanovic@8 31
idamnjanovic@8 32 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 33 %legend(SMALL.solver(i).name,'Original signal',0);
idamnjanovic@1 34 title('Reconstructed and original signals');
idamnjanovic@1 35 end
idamnjanovic@32 36 end
idamnjanovic@1 37 end