[SciPy-User] Roots of a signal
Nils Wagner
nwagner@iam.uni-stuttgart...
Mon Feb 8 14:14:50 CST 2010
Hi all,
How can I compute the roots of a signal ?
The following didn't work due to a memory error.
from scipy.interpolate import splrep, splev, sproot
from numpy import exp, sin, linspace, pi
from pylab import plot, show, legend
t = linspace(0,4,20)
y = exp(-0.1*t)*sin(2*pi*t)
plot(t,y,label='Signal')
tck = splrep(t,y)
t_new = linspace(0,10,40)
y2 = splev(t_new,tck)
plot(t_new,y2,label='Spline')
roots = sproot(tck,10)
legend(loc=0)
show()
Any pointer would be appreciated.
Thanks in advance
Nils
More information about the SciPy-User
mailing list