%haar decomposition example; %discrete time signal; g=[zeros(1,52) 1-(((53:128)/128).^2)]; % generate the next level of wavelet and scaling coefficients from the % signal samples; %this example is for the Haar wavelet; for k=1:63; w6(k)=(g(2*k)-g((2*(k))+1))/2; a6(k)=(g(2*k)+g((2*k)+1))/2; end subplot(311); plot(g); subplot(312); stem(w6); subplot(313); stem(a6);