nanmean
(不建议)卑鄙,忽略南
values
nanmean
不建议。Use the MATLAB®functionmean
反而。With themean
功能,您可以指定是包括还是省略南
计算值。有关更多信息,请参阅Compatibility Considerations。
Description
返回y
= nanmean(X
)mean
元素X
,删除后计算all南
值。
If
X
是a vector, thennanmean(X)
是the mean of all the non-南
elements ofX
。If
X
是a matrix, thennanmean(X)
是列均值的行矢量,在删除后计算南
值。If
X
是a multidimensional array, thennanmean
operates along the first nonsingleton dimension ofX
。这size of this dimension becomes 1 while the sizes of all other dimensions remain the same.nanmean
删除一切南
值。
有关如何nanmean
所有人的对待阵列南
values, seeTips。
Examples
输入参数
输出参数
Tips
When
nanmean
计算所有数组的平均值南
值,阵列是空的南
删除值,因此,其余元素的总和为0
。因为平均计算涉及通过0
,,,,the mean value is南
。这output南
不是南
值。