% auxiliary routine for gcvdemo
% computes the Haar wavelet transform

h = [1 1] / sqrt(2);
ht = h;
g = [1 -1] / sqrt(2);
gt = g;
sh = 0;
sg = 0;
sgt = 0;
sht = 0;
L = 0;
waveletcoef = FWT_BIO(signal, L, ht, gt, sht, sgt);

figure(2)
subplot(1, 1, 1)
% plot(waveletcoef(2:length(waveletcoef)));
% wM = max(waveletcoef(2:length(waveletcoef)));
% wm = min(waveletcoef(2:length(waveletcoef)));
wM = 30;
wm = -30;
plotscales(waveletcoef(2 : length(waveletcoef)), 7, wm, wM);
title('The wavelet transform')
