![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
Hi, I am also looking for the Matlab function cumtrapz. Is there such a thing in scipy ? Nils
![](https://secure.gravatar.com/avatar/f9f51601b09ea094e5059dd3dfbf4d7a.jpg?s=120&d=mm&r=g)
Nils Wagner <nwagner@mecha.uni-stuttgart.de> writes:
Hi,
I am also looking for the Matlab function cumtrapz. Is there such a thing in scipy ?
Attached below is a function I use - please doublecheck it to be sure it works for you. -- Joseph M. Reinhardt, Ph.D. Department of Biomedical Engineering joe-reinhardt@uiowa.edu University of Iowa, Iowa City, IA 52242 Telephone: 319-335-5634 FAX: 319-335-5631
![](https://secure.gravatar.com/avatar/db2b8768e55888615195a7492260fd1b.jpg?s=120&d=mm&r=g)
On Tue, 13 Aug 2002 16:01:12 +0200 Nils Wagner wrote: Nils> I am also looking for the Matlab function cumtrapz. Is there Nils> such a thing in scipy ? You could look at the documentation: ,----[pydoc scipy.integrate] | Python Library Documentation: package scipy.integrate in scipy | | NAME | scipy.integrate - Methods for Integrating Functions given function object. | | FILE | /usr/lib/python2.2/site-packages/scipy/integrate/__init__.py | | DESCRIPTION | quad -- General purpose integration. | dblquad -- General purpose double integration. | tplquad -- General purpose triple integration. | fixed_quad -- Integrate func(x) using Gaussian quadrature of order n. | quadrature -- Integrate with given tolerance using Gaussian quadrature. | romberg -- Integrate func using Romberg integration. | | Methods for Integrating Functions given fixed samples. | | trapz -- Use trapezoidal rule to compute integral of sampled function | simps -- Use Simpson's rule to compute integral from samples. | romb -- Use Romberg Integration to compute integral from | (2**k + 1) evenly-spaced samples. | | See the special module (special.orthogonal) for Gaussian | quadrature roots and weights for other weighting factors and regions. | | Interface to numerical integrators of ODE systems. | | odeint -- General integration of ordinary differential equations. | ode -- Integrate ODE using vode routine. [...] `---- Greetings, Jochen -- University of North Carolina phone: +1-919-962-4403 Department of Chemistry phone: +1-919-962-1579 Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E
![](https://secure.gravatar.com/avatar/49df8cd4b1b6056c727778925f86147a.jpg?s=120&d=mm&r=g)
On Tue, 2002-08-13 at 08:01, Nils Wagner wrote:
Hi,
I am also looking for the Matlab function cumtrapz. Is there such a thing in scipy ?
Nils
It's there, but not exposed due to an oversight. If you add cumtrapz to the __all__ variable in the file scipy/integrate/quadrature.py you will have it available under integrate.cumtrapz This is now fixed in CVS -Travis
participants (4)
-
jmr@engineering.uiowa.edu
-
Jochen Küpper
-
Nils Wagner
-
Travis Oliphant