フィルターのクリア

Moving Mean Function - How to apply

2 ビュー (過去 30 日間)
Dario Walter
Dario Walter 2019 年 6 月 1 日
コメント済み: Dario Walter 2019 年 6 月 1 日
Hey guys,
I want to create a moving average with window size 4 as depicted below (take last 4 entries and in the beginning the highest number of entries available).
Unfortunately I do not get along with the "movmean" function. Can anyone help me?
Val MovAvg
1 1
2 1,5
3 2
4 2,5
5 3,5
6 4,5
7 5,5
8 6,5

採用された回答

Guillaume
Guillaume 2019 年 6 月 1 日
movmean(yourvector, [3, 0], 'Endpoints', 'shrink'); %3 values backward (plus current value), 0 forward. Shrink at edges (beginning only since only looking backward)
  1 件のコメント
Dario Walter
Dario Walter 2019 年 6 月 1 日
Perfect! Thank you so much Guillaume!

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by