Home | Sign in | English  Help WLanguage WLanguage functions Standard functions Functions for managing numeric values Mathematical functions Mean Presentation Example Supported types Mean of durations See also  Abs ArcCos ArcSin ArcTan2 ArcTan CoTan Conversion Cos DecimalPart DecimalToSexagesimal Exp Factorial IntegerPart IsEven IsOdd Ln Log Mathematical functions Max Mean Min Power Root Round RoundDown RoundUp SexagesimalToDecimal Sin Sum Tangent
 Supported typesMean of durations WINDEV      WEBDEV    WINDEV Mobile        Others Mean (Function) In french: Moyenne Calculates the mean of several elements: elements found in an array,numeric values, ... Versions 25 and later This function is now available in browser code. New in version 25 This function is now available in browser code. This function is now available in browser code.Example // Mean of elements found in an array of integersMyArray is array of int = [1,2,3]MyMean is numericMyMean = Mean(MyArray) // MyMean = 2 Syntax Calculating the mean of the elements found in a one-dimensional array (numeric types) = Mean() : NumericMean of the numeric elements found in the array. : Array variableName of the one-dimensional array of numeric types containing the elements whose mean must be calculated. Calculating the mean of the elements found in a one-dimensional array (structured types) = Mean( , ) : NumericMean of values of members. : Array variableName of the one-dimensional array of structured types. The following structured types are allowed: class, dynamic class, structure, dynamic structure.Remark: In an array of dynamic classes or in an array of dynamic structures, the element is ignored if it is not allocated. : Character string (with or without quotes)Name of the member containing the values that must be used to calculate the mean. Calculating the mean of the elements found in a column of a two-dimensional array = Mean( , ) : NumericMean of column values. : Array variableName of the two-dimensional numeric array. : IntegerSubscript of the array column containing the values that must be used to calculate the mean. Calculating the mean of several values = Mean( , [,  [... [, ]]]) : NumericMean of values. : NumericFirst value that must be used to calculate the mean. : NumericSecond value that must be used to calculate the mean. : NumericThird value that must be used to calculate the mean. : NumericLast value that must be used to calculate the mean. Remarks Supported typesThe following types are supported for the arrays of numeric values and for the members of arrays of structured types: all integer types (on 1, 2, 4 or 8 bytes, signed or unsigned + system integer).the real type (on 4 or 8 bytes), the currency type and the numeric type.the Date type.Mean of durationsIf Mean is used to calculate a sum of durations, all the parameters must have the Duration type. Business / UI classification : Neutral codeComponent : wd250mat.dll Minimum version required Version 17 This page is also available for…