u_filt = MovingAverage(u=..., active=...).y;
Real output y is the moving average over the input u as long as Boolean input active is true. If active = true, the output is computed as:
This block is demonstrated with the following example:
results in
simulation result |