StdDev
AnalysisLibErrType StdDev (double inputArray[], ssize_t numberOfElements, double *mean, double *standardDeviation);
Purpose
Calculates the standard deviation and the mean, or average, values of the input array. StdDev uses the following formulas to find the mean and the standard deviation:
Parameters
| Input | ||
| Name | Type | Description |
| inputArray | double [] | Input array from which the mean and the standard deviation are determined. |
| numberOfElements | ssize_t | Number of elements used to find the mean and the standard deviation. |
| Output | ||
| Name | Type | Description |
| mean | double | Mean value of the input array. |
| standardDeviation | double | Standard deviation of the input array. |
Return Value
| Name | Type | Description |
| status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |
Additional Information
Library: Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later
Example
Refer to analysis\stats.cws for an example of using the StdDev function.