How can I calculate running mean over 40 samples in Simulink?
Mostrar comentarios más antiguos
Hello,
I've got the following signal simulated in Simulink:

No I would like to return the average of this signal over a sample time of 40 secondes and running. So average 1 would be over the periode 0-40. Average 2 over the period 1-41, average 3 over 2-42 etc. In Matlab I did this with the following code:
if (tijd >= Reistijd)
inc = inc + 1;
ii = ii + 1;
avgrho(ii) = mean(rho_measurement(inc-Reistijd:inc));
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Simulink en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
