フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

please help interpret this input using the filter function

1 回表示 (過去 30 日間)
CLARK KENDRICK GO
CLARK KENDRICK GO 2018 年 2 月 8 日
閉鎖済み: Birdman 2018 年 2 月 8 日
Please help interpret this input/output using the filter function.
data = [1:0.2:4]';
windowSize = 5;
filter(ones(1,windowSize)/windowSize,1,data)
ans =
0.2000
0.4400
0.7200
1.0400
1.4000
1.6000
1.8000
2.0000
2.2000
2.4000
2.6000
2.8000
3.0000
3.2000
3.4000
3.6000
The data is from 1 to 4 in increments of 0.2. The moving window/length is 5, so it is taking the average of every 5 consecutive data. What does the filter do, in this case? Why is the result such? I don't understand what the filter function did here.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by