Discretized Zero-Pole Memory navigation bar

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

QUARC Targets/Discrete

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

Enabled Moving Average

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

Enabled Moving Average

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

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

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

* Compatible means that the block can be compiled for the target.

 

navigation bar