Avg(), Mean()
Summary
Computes the average value of the elements of an array.
Syntax
value = avg(array my_array)
| Argument | Contents |
|---|---|
| my_array | An array of numbers |
Returns
A real number equal to the mean value of the elements of my_array.
Notes
-
Can also be called as Mean().
-
The array must contain numbers only. Other types, including null, are not allowed.
Example
rslt = Avg({2, 4, 6, 8.0}) // rslt equals 5.0
Error Codes
| Error Type | Meaning |
|---|---|
| Error | The array contains values that are null or are not numbers |
See Also
| Function | Summary |
|---|---|
| Mean() | Computes the mean (average) of the elements of an array |
| Median() | Computes the median of the elements of an array |