function f=daubidwt(c0,c1,c2,c3,F,level)
%fprintf('level=%d\n',level)
%fprintf('N=%d\n',size(F,1))
N=size(F,1);

f= 2*lpf(c0,c1,c2,c3,2*level)'*F(1:level) + 2*hpf(c0,c1,c2,c3,2*level)'*F(level+1:2*level);
nlevel = level*2;

if nlevel < N
	f=[f;F(nlevel+1:N)];
	f=daubidwt(c0,c1,c2,c3,f,nlevel);
end

