Table of Contents
Enabled Moving Average
Implements a moving average (a.k.a., running average, or rolling average) computation. The moving average is only calculated while the input received at the Enable port is greater than zero.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Discrete')Description
The Enabled Moving Average block implements a moving average (a.k.a., running average, or rolling average) computation. The moving average is only calculated while the input received at the Enable port is greater than zero. The calculated moving average consists of the unweighted mean of the data points from the previous iterations since this block has been enabled.
Input Ports
Enable Control Input
Input signal connected to the Enable control input port. The moving average is only calculated while the input received at this port is greater than zero.
X
Input signal to which the unweighted moving average computation is applied.
Output Ports
Xavg
Output of the unweighted moving average computation.
Parameters and Dialog Box
States when enabling (tunable online)
Specifies how to handle internal states when the subsystem becomes reenabled.
reset
resets the states and the previously calculated moving average to their initial conditions of zero.
held
holds the states at their previous values and re-starts the
moving average computation from the previously calculated moving average value.
Sample time (s)
The sample time (in seconds) of the block.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.