AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de valores numéricos / Funciones estadísticas
  • 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
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local