Moving mean
m = movmean(a,k)
m = movmean(a,[kb kf])
m =movemean(___,dim)
m =movemean(___,nanflag)
m =movemean(___,名称,值)
m =movemean(
返回一系列本地A
,k
)k
-pointmeanvalues, where each mean is calculated over a sliding window of lengthk
跨越相邻元素A
. Whenk
is odd, the window is centered about the element in the current position. Whenk
即使是,窗口都集中在当前和以前的元素上。当没有足够的元素填充窗口时,窗口大小会自动在端点上截断。当窗口被截断时,平均值仅在填充窗口的元素上占用。M
大小与A
.
如果A
是一个向量,然后movemean
operates along the length of the vector.
如果A
is a multidimensional array, thenmovemean
沿着第一arra运作y dimension whose size does not equal 1.
m =movemean(___,
returns the array of moving averages along dimensiondim
)dim
对于以前的任何语法。例如,如果A
is a matrix, thenmovemean(A,k,2)
operates along the columns ofA
, computing thek
-element sliding mean for each row.
m =movemean(___,
specifies whether to include or omitnanflag
)南
values from the calculation for any of the previous syntaxes.movmean(a,k,'includeenan')
包括全部南
计算中的值movmean (k ' omitnan ')
ignores them and computes the mean over fewer points.