PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Calculating the standard deviation
StatStandardDeviation (Example)
Calculating the standard deviation
The following code is used to calculate the standard deviation for the value of the elements in row 3.
We assume that the matrix is already created and initialized.
// -- Click code on BTN_StdDeviation
// Declare the variables
ResStandardDeviation is real
// Standard deviation for the value of elements in row 3
ResStandardDeviation = StatStandardDeviation("MyMatrix", 3, False)
// Display the result
IF ResStandardDeviation <> 0 THEN
Info("The standard deviation is: " + ResStandardDeviation)
ELSE
// Error while calculating the standard deviation?
IF StatError() <> 0 THEN
Info("The standard 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