Forums

min/max delay filters

Started by eeburke May 29, 2008
Hello,

This is help for a homework question, and I would not like someone to do
it for me, just help point me in the right direction.

The question is:
Consider the two-element filter [1.0 0.6].  Construct a finely spaced
dimensionless 
frequency vector that extends from -1 to 1.  Calculate and plot the
amplitude and phase lag 
spectra for the filter.  Identify the Nyquist frequency on the plots. 

My thoughts are to use the freqz function, and set

A = 1
B = [1.0 0.6]
f = [-1:1/500:1]
fs = 500

And then run freqz(B,A,f,fs)

the plots just dont look right to me though.

does anyone see where I am going wrong? I know with filters there are
other things I could run (filter, fir, iir) but I am having trouble knowing
when one is appropriate. 

thanks!

erin




>Hello, > >This is help for a homework question, and I would not like someone to do >it for me, just help point me in the right direction. > >The question is: >Consider the two-element filter [1.0 0.6]. Construct a finely spaced >dimensionless >frequency vector that extends from -1 to 1. Calculate and plot the >amplitude and phase lag >spectra for the filter. Identify the Nyquist frequency on the plots. > >My thoughts are to use the freqz function, and set > >A = 1 >B = [1.0 0.6] >f = [-1:1/500:1] >fs = 500 > >And then run freqz(B,A,f,fs) > >the plots just dont look right to me though. > >does anyone see where I am going wrong? I know with filters there are >other things I could run (filter, fir, iir) but I am having trouble
knowing
>when one is appropriate. > >thanks! > >erin > > >
Hi Erin, the amplitude response of the filter, is the absolute of the fourier transform of it's impulse response (B). The phase response of the filter is the angle of the fourier transform of the impulse response. So use the fft command on B and then plot the absolute and angle of the result. Manolis