% Usage: [phi,psi,t] = dyadicortho(c, r) % Given vector c of lowpass filter coefficients for an % orthogonal filter and r this computes the appropriate scaling % function at the dyadic % points k/2^r for 00 && m0 && p<(N-1) s = s+phi(R*p+1)*c(j+1); end phi(k*F+1)=r2*s; end end end %Now compute the wavelet psi=zeros(n,1); %Highpass coefficients d = zeros(1,N); for k=1:N d(k)=(-1)^(k+1)*c(N-k+1); end %Wavelet construction. for m=1:n s=0; for k=1:N q=2*(m-1)-(k-1)*R+1; if q>0 && q<=n s=s+d(k)*phi(q); end end psi(m)=sqrt(2)*s; end t=((0:R*(N-1))/R)';