Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

please help interpret this input using the filter function

1 visualizzazione (ultimi 30 giorni)
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.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by