# FFT vs freqz

Started by August 27, 2004
 hi, i have a low pass filter and i plotted the frequency response using freqz and fft and got diff plots... b=remez(102,[0 0.5 0.6 1],[1 1 0 0]); B = fft(b,1024); P = B.*conj(B); t=(pi/512)*[0:511]; figure(1); semilogy(t,P(1:512),'Color',[1 0 0.4975]); hold on; [h,w]=freqz(b,1,1024); semilogy(w,abs(h)); hold off; can anyone tell me why tht happens..i thought freqz uses the fft algorithm thx divya
 Divya, You probably figured this out by now, but they are the same, except that you squared the fft output but not the freqz output. Try plotting sqrt(P(1:512)) and abs(h). Mark -----Original Message----- From: divya_8910 [mailto:] Sent: Friday, August 27, 2004 3:18 PM To: Subject: [matlab] FFT vs freqz hi, i have a low pass filter and i plotted the frequency response using freqz and fft and got diff plots... b=remez(102,[0 0.5 0.6 1],[1 1 0 0]); B = fft(b,1024); P = B.*conj(B); t=(pi/512)*[0:511]; figure(1); semilogy(t,P(1:512),'Color',[1 0 0.4975]); hold on; [h,w]=freqz(b,1,1024); semilogy(w,abs(h)); hold off; can anyone tell me why tht happens..i thought freqz uses the fft algorithm thx divya _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: To Post: To Leave: Archives: http://www.yahoogroups.com/group/matlab More DSP-Related Groups: http://www.dsprelated.com/groups.php3 Yahoo! Groups Links