ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Statistical functions
  • Number of elements found in the matrix
  • Error management
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
StatCovariance (Function)
In french: StatCovariance
Calculates the covariance between two series of values.
Note The covariance is the average of the product of the deviations for each series.
// Calcul de la covariance entre la ligne 1 et la ligne 2 d'une matrice
ResCovariance = StatCovariance("MaMatrice", 1, 2, False)
Syntax
<Result> = StatCovariance(<Matrix> [, <1st row/1st column> [, <2nd row/2nd column> [, <Row/Column>]]])
<Result>: Real
  • Covariance between the two series,
  • 0 if the covariance is null.
<Matrix>: Character string
Name of the matrix containing the data, defined by MatCreate.
<1st row/1st column>: Optional integer
1st row or 1st column containing the data (1 by default).
<2nd row/2nd column>: Optional integer
2nd row or 2nd column containing the data (2 by default).
<Row/Column>: Optional boolean
  • True (by default) if the series of values correspond to matrix columns,
  • False if the series of values correspond to matrix rows.
Remarks

Number of elements found in the matrix

The number of elements found in the matrix is taken as reference. This number of elements corresponds to:
  • the number of matrix rows, returned by MatNbLine.
  • the number of matrix columns, returned by MatNbColumn.
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.

Error management

Caution: StatCovariance returns no error code. To find out whether errors have been generated when calculating the covariance, use StatError. To get more details on the error, use ErrorInfo 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
Business / UI classification: Neutral code
Component: wd300mat.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help