ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Statistical functions
  • Calculating the standard deviation
StatStandardDeviationP (Example)
Calculating the standard deviation
The following code is used to calculate the standard deviation for the value of the elements in row 3. The value of the elements in this row represents the entire population.
We assume that the matrix is already created and initialized.
// -- Click code on BTN_StdDeviationP
// Declare the variables
ResStandardDeviationP is real
// Standard deviation for the value of elements in row 3
ResStandardDeviationP = StatStandardDeviationP("MyMatrix", 3, False)
// Display the result
IF ResStandarDeviationP <> 0 THEN
Info("The standard deviation is: " + ResStandardDeviationP)
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

Last update: 05/26/2022

Send a report | Local help