8-hr moving/running averages in SImulink
1 view (last 30 days)
Show older comments
Hey guys,
I'm trying to calculate the running/moving average over a fixed time period for a variable in Simulink. However, I am having difficulties in implementing a solution.
I am calculating the variable '_x_' using the ode45 solver at variable-steps. At each time-step, for t>8, I want to calculate the average of '_x_' over the period '_t-8 to t_'. I tried using the integrator block with reset, however, due to the reset, the results are inconsistent. I also checked out the "Windowed Integrator" block however that is dependent on a predetermined number of samples so I can't use it since i'm using variable step.
0 Comments
Answers (0)
See Also
Categories
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!