idamnjanovic@1: function SMALL_plot(SMALL) ivan@128: %% Plots coefficients and reconstructed signals ivan@128: % Function gets as input SMALL structure and plots the solution and ivan@128: % reconstructed signal ivan@128: idamnjanovic@24: % idamnjanovic@24: % Centre for Digital Music, Queen Mary, University of London. idamnjanovic@24: % This file copyright 2009 Ivan Damnjanovic. idamnjanovic@24: % idamnjanovic@24: % This program is free software; you can redistribute it and/or idamnjanovic@24: % modify it under the terms of the GNU General Public License as idamnjanovic@24: % published by the Free Software Foundation; either version 2 of the idamnjanovic@24: % License, or (at your option) any later version. See the file idamnjanovic@24: % COPYING included with this distribution for more information. ivan@128: %% idamnjanovic@1: idamnjanovic@1: figure; idamnjanovic@8: idamnjanovic@8: m=size(SMALL.solver,2); idamnjanovic@8: n=size(SMALL.solver(1).reconstructed,2)+1; idamnjanovic@8: for i =1:m idamnjanovic@8: idamnjanovic@8: subplot(m,n, (i-1)*n+1); plot(1:length(SMALL.solver(i).solution), SMALL.solver(i).solution, 'b') ivan@154: title(sprintf('%s in %.2f s', SMALL.solver(i).name, SMALL.solver(i).time),'Interpreter','none') idamnjanovic@1: xlabel('Coefficient') idamnjanovic@1: idamnjanovic@1: % Plot reconstructed signal against original idamnjanovic@1: idamnjanovic@1: idamnjanovic@8: for j=2:n idamnjanovic@8: idamnjanovic@8: 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--') ivan@132: %legend(SMALL.solver(i).name,'Original signal',0,'Location','SouthOutside','Interpreter','none'); ivan@154: title(sprintf('%s in %.2f s signal %d', SMALL.solver(i).name, SMALL.solver(i).time,n-1),'Interpreter','none') idamnjanovic@1: end idamnjanovic@32: end idamnjanovic@1: end