annotate util/SMALL_plot.m @ 77:62f20b91d870

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