help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Numerical Differentiation and Integration of Array Data


From: c.
Subject: Re: Numerical Differentiation and Integration of Array Data
Date: Sat, 3 Dec 2011 08:00:20 +0100

On 2 Dec 2011, at 21:44, syberraith wrote:

> trapezoid integration algorithm. 
that's already implemented in the "trapz" function and, anyways, 
it is just as simple as this:

suppose you have a list of values y of a function f sampled at points x 

intf = sum (.5*(y(1:end-1)+y(2:end))./dx)

this is completely vectorized, I doubt you'll be able to easily make it any 
faster
in C or fortran, if you do I'd be interested in seeing the comparison.

c. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]