PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Calculating the average deviation
StatAverageDeviation (Example)
Calculating the average deviation
The following code is used to calculate the average deviation for the value of the elements in row 3.
We assume that the matrix is already created and initialized.
// -- Click code on BTN_AveDeviation
// Declare the variables
ResAverageDeviation is real
// Average deviation for the value of the elements in row 3
ResAverageDeviation = StatAverageDeviation("MyMatrix", 3, False)
// Display the result
IF ResAverageDeviation <> 0 THEN
Info("The average deviation is: " + ResAverageDeviation)
ELSE
// Error while calculating the average deviation?
IF StatError() <> 0 THEN
Info("The average deviation is null")
ELSE
// Display the error message
Error(ErrorInfo(errMessage))
END
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment