Home | Sign in | English  Help WLanguage WLanguage functions Standard functions Functions for managing numeric values Statistical functions StatStandardDeviation Presentation Example Number of elements found in a matrix row or in a matrix column Managing errors Related examples See also  StatAverage StatAverageDeviation StatCorrelation StatCovariance StatError StatMax StatMin StatStandardDeviation StatStandardDeviationP StatSum StatVariance StatVarianceP Statistical constants Statistical functions The statistics
• Number of elements found in a matrix row or in a matrix column
• Managing errors
WINDEV      WEBDEV    WINDEV Mobile        Others StatStandardDeviation (Function)
In french: StatEcartType
Calculates the standard deviation for a series of values.
Reminder: The standard deviation gives the dispersion of values in relation to the average value.
Remark: This calculation is performed on a sample of values. To calculate the standard deviation for a full series of values, use StatStandardDeviationP. Versions 18 and later This function is now available in Windows Store apps mode. New in version 18 This function is now available in Windows Store apps mode. This function is now available in Windows Store apps mode. Versions 21 and later This function is now available in Universal Windows 10 App mode. New in version 21 This function is now available in Universal Windows 10 App mode. This function is now available in Universal Windows 10 App mode. Versions 23 and later This function is now available for Java applications. New in version 23 This function is now available for Java applications. This function is now available for Java applications.
// Calculate the standard deviation of the elements in row 1 of a matrix
ResStandardDeviation = StatStandardDeviation("MyMatrix", 1, False)
Syntax
<Result> = StatStandardDeviation(<Matrix> [, <Row/Column number> [, <Row/Column>]])
<Result>: Real
• Standard deviation of values.
• 0 if the standard deviation is null.
<Matrix>: Character string (with quotes)
Name of the matrix containing the data, defined by MatCreate.
<Row/Column number>: Optional integer
Number of the row or column containing the data (1 by default).
<Row/Column>: Optional boolean
• True (by default) if the series of values corresponds to a matrix column,
• False if the series of values corresponds to a matrix row.
Remarks

Number of elements found in a matrix row or in a matrix column

The number of elements found in a matrix row or in a matrix column is taken as a reference. This number of elements corresponds to:
• the total number of matrix rows, returned by MatNbLine (if the calculation is performed on a column),
• the total number of matrix columns, returned by MatNbColumn (if the calculation is performed on a row).
If the series contain less elements than the matrix, the missing values are automatically filled with 0. These values are taken into account during the calculations.

Managing errors

Caution: StatStandardDeviation returns no error code. To find out whether errors have been generated when calculating the standard deviation, use StatError. To find out the error details, use ErrorInfo with the errMessage constant.
Related Examples: Unit examples (WINDEV): The Stat functions [ + ] Using the main functions for statistical calculations (using matrices):- Calculate a sum of values- Calculate a mean of values- Find the minimum value in a set of values- Find the maximum value in a set of values
Business / UI classification : Neutral code
Component : wd250mat.dll
Minimum version required
• Version 9