Thu Nov 4 08:29:21 CDT 2010
On Thu, 4 Nov 2010 08:20:27 -0500
Ryan May <firstname.lastname@example.org> wrote:
> On Thu, Nov 4, 2010 at 3:42 AM, Nils Wagner
> <email@example.com> wrote:
>> Hi all,
>> cumtrapz can be used to compute the antiderivative.
>> x = linspace(0,2*pi,200)
>> y = 2*cos(2*x)
>> Y = cumtrapz(y,x)
>> len(y) = 200
>> len(Y) = 199
>> The length of the arrays y and Y differ by one. For what
>> reason ?
> Because when integrating using the trapezoid rule, you
>are forming N-1
> trapezoids from N datapoints.
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
> SciPy-User mailing list
is there an integration rule in scipy that preserves the
length of the input array ?
I would to integrate an acceleration signal twice to
obtain the displacement.
v = \int a dt = \int dv
u = \int v dt = \int du
More information about the SciPy-User