[SciPy-user] problems with signal-functions impulse and step ...
Stefan van der Walt
stefan at sun.ac.za
Sun Apr 15 17:40:58 EDT 2007
Hi Stef
On Sun, Apr 15, 2007 at 10:35:12PM +0200, Stef Mientki wrote:
> I wonder if I'm doing something wrong,
> or if the signal library might have has some small bugs.
> Do others have the same experience ?
>
> #I create a highpass filter,
> #which amplitude and phase characteristic looks good
> filt_1 = signal.iirdesign( 0.06, 0.002, 1, 50, 0, 'butter')
>
> # Now when I want to calculate the impuls response,
> aa,bb = signal.impulse( filt_1[0], filt_1[1] )
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])
Cheers
Stéfan
More information about the SciPy-User
mailing list