addpath('toolbox_signal');
addpath('toolbox_general');
N=512;
name='piece-regular';
f=rescale(load_signal(name,N));
fw=analyse_haar(f);
figure; plot_wavelet(fw);
axis([1 N -2.1 2.4]);
fprintf('Difference energie= %3f\n', norm(f)-norm(fw));
fr=synthese_haar(fw, log(N-1));