%priklady na DTFT
clear all;
hold on
SIGSIZE=512
for order=1:2:40
   %vstup signalu je napr. imp. charakteristika max. hladkeho filtra
   wavelet=sprintf('Db%d',order)
   [LO_D,HI_D,LO_R,HI_R] = WFILTERS(wavelet);
   
   filter=LO_R;
   n=0:1:SIGSIZE-1;
   F=zeros(1,SIGSIZE);
   for a=1:length(filter)
      F=F+filter(a)*exp(-i*2*3.1415926*(a-1)*n/SIGSIZE);
   end
   plot(abs(F),'blue');
end

for order=1:2:40
   %vstup signalu je napr. imp. charakteristika max. hladkeho filtra
   wavelet=sprintf('Db%d',order)
   [LO_D,HI_D,LO_R,HI_R] = WFILTERS(wavelet);
   
   filter=HI_R;
   n=0:1:SIGSIZE-1;
   F=zeros(1,SIGSIZE);
   for a=1:length(filter)
      F=F+filter(a)*exp(-i*2*3.1415926*(a-1)*n/SIGSIZE);
   end
   plot(abs(F),'red');
end