[SciPy-user] problems with signal-functions impulse and step ...

Stefan van der Walt stefan@sun.ac...
Mon Apr 16 04:51:45 CDT 2007


On Mon, Apr 16, 2007 at 10:01:14AM +0200, Stef Mientki wrote:
> > The function signature for signal.impulse is
> >
> > signal.impulse(system, X0=None, T=None, N=None)
> >
> > Where
> >
> >       system -- an instance of the LTI class or a tuple with 2, 3, or 4
> >                 elements representing (num, den), (zero, pole, gain), or
> >                 (A, B, C, D) representation of the system.
> >
> > (By the way, IPython is extremely useful in investigating this sort of
> > thing -- you simply type signal.impulse?<enter>)
> >
> > So, I think what you want to do is:
> >
> > aa,bb = signal.impulse(filt_1[:2])
> >
> >   
> thanks Stéfan,
> but it doesn't seem to work either.

Are you saying that the following code snippet crashes?

b,a = signal.iirdesign(0.06,0.006,1,50,0,'butter')
signal.impulse((b,a))

If so, which version of scipy are you using?  This works fine on 0.5.3
r2897.

> I don't see the difference between:
> 
> aa,bb = signal.impulse(filt_1[:2])
> 
> aa,bb = signal.impulse(filt_1)

There is no difference -- I was just trying to emphasise that you need
to specify a tuple/list of two elements as the input parameter -- not
two two separate parameters like you had it.

Regards
Stéfan


More information about the SciPy-user mailing list