Matrix::MeanRows Method

void MeanRows(TVec *result) const;

Calculates the mean value of each of the matrix rows.

#NameTypeDescription
1resultTVec *
Remarks:

Calculate the mean vale of each of the calling matrix rows and store the results in result vector. The Matrix::Length and Matrix::Complex properties of the result vector are adjusted automatically.

Examples
#include "MtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Matrix A;
    Vector res;

    A.SetIt(2, 2, false, DewArray<double>{1, 5, -3, 6});
    A.MeanRows(res); // res = (3, 1.5)
}
See Also: Matrix::MeanCols
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler