% computes the wavelet transform of a colored noise
% uses fir1 from signal toolbox
% requires MakeBSFilter, FWT_PB, filter, plotscales

randn('seed',931316785);
N = 2048;
whitenoise = randn(N,1);

% fir1 from signal toolbox to generate high-pass filter
%HP7 = fir1(100,0.7,'high'); save fir1 HP7 -APPEND;

load fir1 HP7 % to avoid the use of fir1
noise1 = filter(HP7,1,whitenoise); % built in function filter
L = 3; % level of decomposition

% generate biorthogonal CDF filters

[qmf,dqmf] = MakeBSFilter('CDF',[2 2]); % WaveLab function

w = FWT_PB(noise1,L,qmf,dqmf); % WaveLab function

figure(1), plotscales(w,L,-3,3)
title('Wavelet transform of colored noise')
%print -deps bio22kleur0.7high.eps

