function wavelets = showwavelets(w, L) % FUNCTION: showwavelets Part of DPWT Toolbox % % SYNOPSIS: WAVELETS = showwavelets(W, L) % % DESCRIPTION: showwavelets plots wavelets % corresponding to filter L. The wavelets are of % the same length as W. The resulting plot is a % superposition of all wavelets whose % coordinates are non zero. The output vector WAVELETS % has a component wavelet in each of its % columns. % % EXAMPLE: w = zeros(1,2^7); % w = putlevel(w, [0 1 0 0], 2); % w = putlevel(w, [0 0 01 0 0 0 0 0.5, zeros(1,24)], 5); % showwavelets(w, daubcofs(2)); % % ALGORITHM: The graph is constructed by taking the inverse % wavelet transforms of the coordinate vectors % constructed by inserting each non-zero entry of % w into a zero vector the same size as w. % % AUTHOR: Neil Getz % DATE: 5-12-92 % % COPYRIGHT 1992, Neil Getz % if((nargin < 2) | (nargin > 3)) help showwavelets; return; end; if(~validwavcoords(w)), error(['Wavelet coordinate vector, arg1, must have a length that is an', ... 'integer power of 2.']); end; lenw = length(w); dexs = find(w~=0); wavelets = zeros(lenw,length(dexs)); for i = 1:length(dexs), ww = zeros(size(w)); ww(dexs(i)) = w(dexs(i)); wavelets(:,i) = column(idpwt(ww,L)); end; plot(wavelets);