mean
Statistical mean function.
Syntax
mean(expr )
Argument
- expr
- A valid scalar, vector, or matrix expression.
Example
Templex Expression | Result |
---|---|
{mean(6)} |
6 |
{mean( {1, 2, 3, 4, 5} )} |
3 |
{mean({{1, 0}, {0, -1}})} |
0 |
Comments
The mean function returns a scalar that is the average of all of the elements of expr.