Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

please help interpret this input using the filter function

1 Ansicht (letzte 30 Tage)
CLARK KENDRICK GO
CLARK KENDRICK GO am 8 Feb. 2018
Geschlossen: Birdman am 8 Feb. 2018
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.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by