Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Discussion Groups

Discussion Groups | Matlab DSP | FFT vs freqz

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

FFT vs freqz - divya_8910 - Aug 27 19:18:00 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





(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

RE: FFT vs freqz - Egler, Mark - Aug 31 17:35:00 2004

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 _____________________________________
/groups.php3
Yahoo! Groups Links




(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )