tags:

views:

24

answers:

1

Z = TRAPZ(X,Y) computes the integral of Y with respect to X using the trapezoidal method.

TRAPZ is an existing function in MATLAB, but how to implement it in PHP?

+2  A: 

hey, what about wikipedia? http://en.wikipedia.org/wiki/Trapezoidal_rule here is great explanation and even code samples.

Andrey