Take a fixed window average of large column vector?

2 ビュー (過去 30 日間)
Joe Bennet
Joe Bennet 2020 年 11 月 12 日
回答済み: Ameer Hamza 2020 年 11 月 12 日
Im trying to shrink the size of a column vector by averaging every 10 terms inside. At the moment it has about 7000 terms inside and I would like to shrink it by a factor of 10. I have been trying to use mean reshape command but to no avail. Can anyone help?
thanks

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 11 月 12 日
This shows an example
x = rand(7000,1);
y = mean(reshape(x, 10, []))

カテゴリ

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