MathMoments
MathMoments
计算数组元素的前4力矩:平均值,方差,偏度,峰度。
bool MathMoments(
const double& array[], // 数值数组
double& mean, // 平均值变量
double& variance, // 方差变量
double& skewness, // 偏度变量
double& kurtosis, // 峰度变量
const int start=0, // 初始计算索引
const int count=WHOLE_ARRAY // 元素数量
)参数
- array[]
[in] 数值数组。
- 平均值
[out] 平均值变量(第1力矩)。
- 方差
[out] 方差变量(第2力矩)。
- 偏度
[out] 偏度变量(第3力矩)。
- 峰度
[out] 峰度变量(第4力矩)。
- start=0
[in] 初始计算索引。
- count=WHOLE_ARRAY
[in] 计算的元素数量。
返回值
如果力矩成功计算返回true,否则为False。