Jerry wrote
> I just submitted a bug report for a big-ass bug in freqz:
> 
> 
> If h is an FIR impulse response, then
> freqz(h);
> performs as advertised. However, 
> freqz(h, N);
> where N is any number including the default 512 returns incorrect
> magnitude results.

You probably got what you needed, just a little more clarification: If you
look at help for freqz you'll see it's designed to give the frequency
response of IIR filters. Your particular usage freqz(h, N) tells freqz that
you want the frequency response of an IIR filter with transfer function
numerator of h and denominator of N. But freqz can also be used for FIR
filters, just have to remember that the denominator of an FIR filter's
transfer function is 1, i.e. it's a simple polynomial with no denominator
term. So, as the previous respondent says, make your second input argument a
1 and you're on your way. The explanation for why it worked when you
specified freqz(h) is contained in the help: "If A is omitted, the
denominator is assumed to be 1 (this corresponds to a simple FIR filter)."



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Bug-in-freqz-tp4633628p4644798.html
Sent from the Octave - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to