# cumtrapz

Cumulative numerical integration of discrete data using the trapezoid rule.

## Syntax

area=cumtrapz(y)

area=cumtrapz(x,y)

## Inputs

`x`- Values of the domain variable.
`y`- Values of the range variable.

## Outputs

- area
- The estimated cumulative area.

## Example

`x = [0:0.05:1]*pi; area = cumtrapz(x,sin(x))`

`area = [Matrix] 1 x 11 0.00000 0.04854 0.18941 0.40882 0.68529 0.99176 1.29823 1.57470 1.79411 1.93498 1.98352`

## Comments

cumtrapz is appropriate for use with sampled data when the function is not available.