MF_centerOfGravityInd  MD_centerOfGravityInd  ME_centerOfGravityInd 

Function  Center of gravity of a matrix with respect to the element indizes 

ä
Syntax C/C++  #include <MFstd.h>
fComplex MF_centerOfGravityInd( fMatrix MA, ui ht, ui len ); 
C++ VecObj  #include <OptiVec.h>
complex<T> matrix<T>::centerOfGravityInd(); 
Pascal/Delphi  uses VFstd;
procedure MF_centerOfGravityInd( var COG:fComplex; MA:fMatrix; ht, len:UIntSize ); 

Description  The center of gravity of the matrix MA is determined. It is assumend that the values of MA represent point masses situated at the positions given by the element indices. The center of gravity is returned as a complex number whose real part contains the X coordinate and whose imaginary part contains the Y coordinate. Please note that this ordering of the coordinates is different from the ordering of matrix element indices (where the first index gives the ith row, in other words, the Y coordinate). If all elements of MA are 0, there is no mass and, strictly speaking, no center of gravity. In this case, the center of gravity is assumed as the geometrical center of MA, i.e. as ( (len1) / 2; ( (ht1) / 2; ).
In order to calculate the center of gravity of an MZ matrix over explicitly given XY coordinates, call MF_centerOfGravityV. 

Return value  (Interpolated) coordinates of the center of gravity 

