How can i use Moving Average Filter to change the sampling rate of a signal!?

6 ビュー (過去 30 日間)
Omar Aljanaideh
Omar Aljanaideh 2017 年 11 月 29 日
コメント済み: Christoph F. 2017 年 11 月 30 日
How to design a moving average filter to change the sampling rate of a signal?! An example will be appreciated.

採用された回答

Christoph F.
Christoph F. 2017 年 11 月 29 日
You filter the signal and then you reduce the sampling rate.
In the most simple case:
X=filter([0.5 0.5], 1, X); % Two-element moving average filter
X=X(1:2:end); % Halve the sampling rate of the signal X
Of course, depending on the characteristics of the signal, you may want a longer moving average for a better suppression of higher frequencies.
  1 件のコメント
Omar Aljanaideh
Omar Aljanaideh 2017 年 11 月 30 日
Thank you Chris for the answer, but could that implemented in Simulink model that has embedded Matlab function. It is not easy to edit the single size if an embedded Matlab function that is used to reduce the sampling. Please provide an example if you can. Thanks

サインインしてコメントする。

その他の回答 (1 件)

Omar Aljanaideh
Omar Aljanaideh 2017 年 11 月 29 日
Thank you Chris for the answer, but could that implemented in Simulink model that has embedded Matlab function. It is not easy to edit the single size if an embedded Matlab function is used to reduce the sampling. Please provide an example if you can. Thanks
  1 件のコメント
Christoph F.
Christoph F. 2017 年 11 月 30 日
The same operation can probably be done in Simulink using the "Discrete FIR filter" block and a "Rate transition" block. I am not as familiar with Simulink as I am with MatLAB.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStatistics and Linear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by