sgwt_view_design : display filter design in spectral domain function sgwt_view_design(g,t,arange) This function graphs the input scaling function and wavelet kernels, indicates the wavelet scales by legend, and also shows the sum of squares G and corresponding frame bounds for the transform. Inputs : g - cell array of function handles for scaling function and wavelet kernels t - array of wavelet scales corresponding to wavelet kernels in g arange - approximation range
0001 % sgwt_view_design : display filter design in spectral domain 0002 % 0003 % function sgwt_view_design(g,t,arange) 0004 % 0005 % This function graphs the input scaling function and wavelet 0006 % kernels, indicates the wavelet scales by legend, and also shows 0007 % the sum of squares G and corresponding frame bounds for the transform. 0008 % 0009 % Inputs : 0010 % g - cell array of function handles for scaling function and 0011 % wavelet kernels 0012 % t - array of wavelet scales corresponding to wavelet kernels in g 0013 % arange - approximation range 0014 0015 % This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox) 0016 % Copyright (C) 2010, David K. Hammond. 0017 % 0018 % The SGWT toolbox is free software: you can redistribute it and/or modify 0019 % it under the terms of the GNU General Public License as published by 0020 % the Free Software Foundation, either version 3 of the License, or 0021 % (at your option) any later version. 0022 % 0023 % The SGWT toolbox is distributed in the hope that it will be useful, 0024 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0025 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0026 % GNU General Public License for more details. 0027 % 0028 % You should have received a copy of the GNU General Public License 0029 % along with the SGWT toolbox. If not, see <http://www.gnu.org/licenses/>. 0030 0031 function sgwt_view_design(g,t,arange) 0032 x=linspace(arange(1),arange(2),1e3); 0033 clf 0034 hold on 0035 0036 J=numel(g)-1; 0037 co=get(gca,'ColorOrder'); 0038 G=0*x; 0039 for n=0:J 0040 plot(x,g{1+n}(x),'Color',co(1+n,:)); 0041 G=G+g{1+n}(x).^2; 0042 end 0043 plot(x,G,'k'); 0044 [A,B]=sgwt_framebounds(g,arange(1),arange(2)); 0045 0046 hline(A,'m:'); 0047 hline(B,'g:'); 0048 leglabels{1}='h'; 0049 for j=1:J 0050 leglabels{1+j}=sprintf('t=%.2f',t(j)); 0051 end 0052 leglabels{J+2}='G'; 0053 leglabels{J+3}='A'; 0054 leglabels{J+4}='B'; 0055 0056 %set(gca,'Ytick',0:3); 0057 0058 legend(leglabels) 0059 title(['Scaling function kernel h(x), Wavelet kernels g(t_j x), Sum ' ... 0060 'of Squares G, and Frame Bounds']); 0061 0062 function hline(y,varargin) 0063 xl=xlim; 0064 plot(xl,y*[1 1],varargin{:});