>>help trapz
trapz (MathScript Function)
Member of the vector class.
Hi Grant & zolaman
Am I missing something here? Have a look MatScript trapz help below
Syntax
c = trapz(y)
c = trapz(x, y)
Description
Computes numerical integration using the trapezoidal method.
Inputs
x - Specifies the x-values of the function that you want to integrate. x is a vector.
y - Specifies the y-values of the function that you want to integrate. y is a vector or matrix of the same size as x. If y is a matrix, c returns the integrals of all columns of y.
Outputs
c - Returns the numerical integration of y. c is a scalar or vector.
Examples
Y = [0, 1, 2, 3, 4]
C = trapz(Y)
Related Topics
cumsum
sum