|
|
|
|
- Calculating the covariance
Calculating the covariance The following code is used to calculate the covariance between row 3 and row 5 of a matrix. We assume that the matrix is already created and initialized. // -- Click code on BTN_Covariance // Declare the variables ResCovariance is real // Covariance between the elements of row 3 and the elements of row 5 ResCovariance = StatCovariance("MyMatrix", 3, 5, False) // Display the covariance IF ResCovariance <> 0 THEN Info("The covariance is: " + ResCovariance) ELSE // Error while calculating the covariance? IF StatError() <> 0 THEN Info("The covariance is null") ELSE // Display the error message Error(ErrorInfo(errMessage)) END END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|