# cusum

Detect small changes in mean using cumulative sum

## Syntax

## Description

`[`

returns
the first index of the upper and lower cumulative sums of `iupper,ilower`

] = cusum(`x`

)`x`

that
have drifted beyond five standard deviations above and below a target
mean. The minimum detectable mean shift is set to one standard deviation.
The target mean and standard deviations are estimated from the first
25 samples of `x`

.

`[`

returns
all the indices at which the upper and lower cumulative sums exceed
the control limit.`iupper,ilower`

] = cusum(___,'all')

`[`

also returns the upper and lower
cumulative sums.`iupper,ilower`

,`uppersum,lowersum`

]
= cusum(___)

`cusum(___)`

with no output arguments
plots the upper and lower cumulative sums normalized to one standard
deviation above and below the target mean.

## Examples

## Input Arguments

## Output Arguments

## More About

## Extended Capabilities

## Version History

**Introduced in R2016a**