how to do running mean?

2 ビュー (過去 30 日間)
Lilya
Lilya 2020 年 10 月 22 日
コメント済み: Lilya 2020 年 10 月 25 日
Hi all,
I have a 3d matrix with a dimension of 21*41*273, for which I want to do the running mean over the third dimension (273 days) for every 4 days.
Any help would be appreciated.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 10 月 22 日
Try something like this
M = rand(21, 41, 273);
M_new = movmean(M, [0 3], 3, 'Endpoints', 'discard');
M_new = M_new(:,:,1:4:end);
  5 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 10 月 25 日
Yes, It means that it takes data from the current value and the next three values.
Lilya
Lilya 2020 年 10 月 25 日
Thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDirection of Arrival Estimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by