Member of the basic class.
c = cumtrapz(a)
c = cumtrapz(a, b)
Computes the cumulative trapezoidal integrals of a vector or matrix.
| Name | Description | ||||
| a | Specifies a vector or matrix. | ||||
| b | Specifies whether to compute the column-wise or the row-wise cumulative trapezoidal integrals of a. b is an integer that accepts the following values.
|
| Name | Description |
| c | Returns the cumulative trapezoidal integrals of a. If a is a vector, c returns a vector of the cumulative trapezoidal integrals of a. If a is a matrix and you do not specify b, c returns a matrix whose elements are the column-wise cumulative trapezoidal integrals of a. c is a vector or matrix of the same size as a. |
A = [1:0.1:3];
B = A.^2;
C = cumtrapz(B)