Re: POLEZERO plots

*To*: mathgroup at smc.vnet.net*Subject*: [mg19069] Re: POLEZERO plots*From*: "P.J. Hinton" <paulh at wolfram.com>*Date*: Thu, 5 Aug 1999 01:34:55 -0400*Organization*: "Wolfram Research, Inc."*References*: <7o5ilf$rmr@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

On 2 Aug 1999, John Cogill wrote: > The excellently written notebook, from Mathsource, seems to have > errors in both the numerator and the denominator of the > digitized transfer function. It is not clear from your introduction exactly _which_ notebook you are talking about? Do you have a title or a MathSource item number for the notebook? I am assuming that you're speaking of MathSource Item 0205-546 "Filter Design by Pole-Zero Placement" by H. Joel Trussell. > My Mathematica 4 complains "ivar .. " until I change the zeros to ones > in both cases. > > I feel I must be missing something. The problem is with the author's use of the Coefficient[] function, with which the "ivar" tag is associated. Mathematica does not allow you to invoke Coefficient[] with an integer (1). If you rewrite the assignments for ncoeff and dcoeff so that they use CoefficientList[] OLD: ncoeff = Table[ Re[Coefficient[numerator,z^k]],{k,0,Length[zeros]}]; NEW: ncoeff = Map[Re, CoefficientList[numerator,z]]; OLD: dcoeff = Table[ Re[Coefficient[denominator,z^k]],{k,0,Length[poles]}]; NEW: dcoeff = Map[Re, CoefficientList[denominator,z]]; The code works fine. I am copying the notebook's author in on this message so that he can fix the notebook and resubmit an update to MathSource if he wishes. -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc.

**Follow-Ups**:**Re: Re: POLEZERO plots***From:*Daniel Lichtblau <danl@wolfram.com>