### EVAR – Moving mean value and standard deviation

Block SymbolLicensing group: STANDARD

Function Description
The EVAR block estimates the mean value mu ($\mu$) and standard deviation si ($\sigma$) from the last n samples of the input signal u according to the formulas

$\begin{array}{rcll}{\mu }_{k}& =& \frac{1}{\mathtt{\text{n}}}\sum _{i=0}^{n-1}{\mathtt{\text{u}}}_{k-i}& \text{}\\ {\sigma }_{k}& =& \sqrt{\frac{1}{\mathtt{\text{n}}}\sum _{i=0}^{n-1}{\mathtt{\text{u}}}_{k-i}^{2}-{\mu }_{k}^{2}}& \text{}\end{array}$

where $k$ stands for the current sampling instant.

Input

 n Number of samples to estimate the statistical properties from  $↓$2 $↑$10000000 $\odot$100 Long (I32) nmax Limit value of parameter n (used for internal memory allocation)  $↓$10 $↑$10000000 $\odot$200 Long (I32)