AngouriMath

Navigation

← Back to list of members

Average​(AngouriMath.​Entity.​Matrix)

 Method (no overloads)

Summary

The arithmetic mean of a matrix's cells.
https://en.wikipedia.org/wiki/Arithmetic_mean

Parameter "m"

The matrix whose cells are averaged. A vector is a matrix here.

Returns

Their sum over their count.

Remarks

Symbolic, so it averages what it is given rather than what it can evaluate:
Avg of [a, b] is (a + b) / 2. See
#321.

Exception "ArgumentNullException"

Thrown where the matrix is null.

Example

using System;
using AngouriMath;
using static AngouriMath.MathS;
            
Console.WriteLine(Average(Vector(1, 2, 3)).Simplify());
Console.WriteLine(Average(Vector("a", "b")).Simplify());

Prints
2
(a + b) / 2

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online