matlab 如何求截尾均值matlab 如何求10%截尾均值

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/13 14:22:10

matlab 如何求截尾均值matlab 如何求10%截尾均值
matlab 如何求截尾均值
matlab 如何求10%截尾均值

matlab 如何求截尾均值matlab 如何求10%截尾均值
>> help trimmean
trimmean Trimmed mean.
M = trimmean(X,PERCENT) calculates the trimmed mean of the values in X.
For a vector input, M is the mean of X, excluding the highest and
lowest K data values, where K=N*(PERCENT/100)/2 and where N is the
number of values in X. For a matrix input, M is a row vector
containing the trimmed mean of each column of X. For N-D arrays,
trimmean operates along the first non-singleton dimension. PERCENT is
a scalar between 0 and 100.

M = trimmean(X,PERCENT,FLAG) controls how to trim when K is not an
integer. FLAG can be chosen from the following:

'round' Round K to the nearest integer (round to a smaller
integer if K is a half integer). This is the default.
'floor' Round K down to the next smaller integer.
'weight' If K=I+F where I is the integer part and F is the
fraction, compute a weighted mean with weight (1-F) for
the (I+1)th and (N-I)th values, and full weight for the
values between them.

M = trimmean(X,PERCENT,FLAG,DIM) takes the trimmed mean along dimension
DIM of X.

The trimmed mean is a robust estimate of the sample location.

trimmean treats NaNs as missing values, and removes them.