PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Number of elements found in a matrix row or in a matrix column
  • Managing the errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Calculates the variance for a series of values.
Note: This calculation is performed on a sample of values. To calculate the variance for a full series of values, use StatVarianceP.
// Calculate the variance of the elements in row 3
ResVariance = StatVariance("MyMatrix", 3, False)
Syntax
<Result> = StatVariance(<Matrix Name> [, <Row/Column Number> [, <Row/Column>]])
<Result>: Real
Variance for a series of values.
<Matrix Name>: 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 the errors

Caution: StatVariance returns no error code. To find out whether errors have been generated when calculating the variance, use StatError. To find out the error details, use ErrorInfo associated with the errMessage constant.
Related Examples:
The Stat functions 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
Component : wd240mat.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment