给定过滤器 window 的时间序列表示,如何在 Matlab 中过滤时间序列?

How to filter a time series in Matlab given a time series representation of the filter window?

假设您有一个时间序列

y(n)

和一个window

w(n)=bartlett(L)

(或任何其他 window)。如何在 Matlab 中使用 window 过滤时间序列?如果你申请

conv(w,y),

你得到一个比 y 长的信号。

output = filter(w,1,y);

应该可以解决问题。或者,您可以使用 fftfilt(语法略有不同)。