TMtx.MeanCols Method

void MeanCols(TVec result)

Calculates the mean value of each of the matrix columns.

#NameTypeDescription
1resultTVecsource TVec

Result: stored in self (calling object)

Remarks:

Calculate the mean vale of each of the calling matrix columns and store the results in result vector. The and Dew.Math.TMtxVec.Complex properties of the result vector are adjusted automatically.

Examples
TMtx A;
TVec res;
A = TMtx.Create;
res = TVec.Create;
try
    {
        A.SetIt(2,2,false,[1,5,
        -3,6]);
        A.MeanCols(res); // res = (-1.0, 5.5)
    }
finally
    {
        A.Free;
        res.Free;
    }
See Also: TMtx.MeanRows