SDev

(Engine-Level Function)

Description: Returns the statistical sample standard deviation for a subsection of an array.
Returns: Numeric
Usage: Script or steady state.
Function Groups: Array,  Generic Math
Related to: AMax | AMin | AValid | FiltHigh | FiltLow | FitOffset | FitSlope | Mean | Sum | Variance
Format: SDev(ArrayElem, N)
Parameters:  
ArrayElem
Required. Any array element giving the starting point in the array. The subscript for the array may be any numeric expression. If processing a multidimensional array, the usual rules apply to decide which dimension should be used.
N
Required. Any numeric expression giving the number of array elements to use starting at the element given by the first parameter. If N extends past the upper bound of the lowest array dimension, this computation will "wrap-around" and resume at element 0, until N elements have been processed.
Comments: The function returns an invalid result if either of its parameters is invalid or if there are less than two valid numerical array elements in the specified range. Invalid elements are not included in the calculation.

Example:

productStdDev = SDev(weight[0], 5);

This computes the standard deviation of elements 0 to 4 of the array weight.