|
|
|
|
- Number of elements found in a matrix row or in a matrix column
- Managing errors
StatAverageDeviation (Function) In french: StatEcartMoyen Calculates the average deviation of values in relation to their arithmetic mean. Remark: The average deviation gives the dispersion in a set of values.
// Calculate the average deviation of the elements in row 1 of a matrix ResAverageDeviation = StatAverageDeviation("MyMatrix", 1, False)
Syntax
<Result> = StatAverageDeviation(<Matrix> [, <Row/Column number> [, <Row/Column>]])
<Result>: Real - Average deviation of values,
- 0 if the average deviation is null.
<Matrix>: Character string 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. Caution: StatAverageDeviation returns no error code. To find out whether errors have been generating when calculating the average deviation, use StatError. To get more details on the error, 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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|