How to make a simple moving average filter object?

10 ビュー (過去 30 日間)
Varun Gupta
Varun Gupta 2020 年 7 月 22 日
回答済み: Abhishek Kumar 2020 年 12 月 11 日
I want to design a simple moving avergae filter object with window size 5 and cutoff frequency 0.3 (scaled to 1).
using dsp.MovingAverage() doesn't return a filter object.
(I need a filter object to visualize the filter using fvtool)
Please help me with this,
Thanks.

回答 (1 件)

Abhishek Kumar
Abhishek Kumar 2020 年 12 月 11 日
Hi Varun, to learn more about usage of moving average filter you can follow the following links:
for the purpose of your reference here is a sample example:
movAvg = dsp.MovingAverage(10,'Method','Sliding window');
input = randn(1024,1);
filterOutput = movAvg(input);
fvtool(filterOutput,1)

カテゴリ

Help Center および File ExchangeFilter Analysis についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by