Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

please help interpret this input using the filter function

1 visualización (últimos 30 días)
CLARK KENDRICK GO
CLARK KENDRICK GO el 8 de Feb. de 2018
Cerrada: Birdman el 8 de Feb. de 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.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by