PLECS 2.0 Online Help

Discrete Mean Value

Purpose

Calculate the running mean value of the input signal.

Library

Extras/Discrete Analysis

Description

[Picture]

This block calculates the running mean of the input signal based on discrete samples. The sample time and the number of samples can be specified. The block is implemented with a shift register and an accumulator. The sample entering the shift register is added to the accumulator, the sample exiting the shift register is subtracted from the accumulator. The output of the block is the current accumulator value divided by the number of samples.


Note  This block is only available for Matlab 7.0 or newer.

Parameters and Dialog Box

[Picture]

Initial condition
The initial condition describes the input signal before simulation start. This parameter may either be a scalar or a vector matching the number of samples. The default is 0.
Sample time
The time interval between samples.
Number of samples
The number of samples used to calculate the mean value.