[Master Index]
[Index for /tools/hpmatlab/toolbox/matlab/datafun]
trapz
(/tools/hpmatlab/toolbox/matlab/datafun/trapz.m)
Function Synopsis
z = trapz(x,y)
Help text
TRAPZ Trapezoidal numerical integration.
Z = TRAPZ(X,Y) computes the integral of Y with respect to X using
trapezoidal integration. X and Y must be vectors of the same length,
or X must be a column vector and Y a matrix with as many rows as X.
TRAPZ computes the integral of each column of Y separately.
The resulting Z is a scalar or a row vector.
Z = TRAPZ(Y) computes the trapezoidal integral of Y assuming unit
spacing between the data points. To compute the integral for
spacing different from one, multiply Z by the spacing increment.
See also SUM, CUMSUM.
Cross-Reference Information
This function calls
- diff /tools/hpmatlab/toolbox/matlab/datafun/diff.m
- end /tools/hpmatlab/toolbox/matlab/lang/end.m
- error /tools/hpmatlab/toolbox/matlab/lang/error.m
- if /tools/hpmatlab/toolbox/matlab/lang/if.m
- length /tools/hpmatlab/toolbox/matlab/general/length.m
- nargin /tools/hpmatlab/toolbox/matlab/elmat/nargin.m
- size /tools/hpmatlab/toolbox/matlab/general/size.m
Produced by mat2html on Wed Feb 8 12:25:18 EST 1995
Cross-Directory links are: ON