Average

Computes the average of a real-valued signal over time. Values are only accumulated when enable is 1. Before any values have been accumulated, the resulting signal average will be 0. Notice that since the counter of accumulated cycles may be stored in a 32-bit signed integer, the resulting signal may be invalid after 2147483648 accumulated cycles.

Blocks tree path

Standard\Dynamic\Average

Inputs

Name Type Description
i real The value to compute the average of.
enable bool 1 to accumulate i this cycle, 0 to ignore i this cycle.

Outputs

Name Type Description
average real The time average of i, or 0 if enable has not yet been 1.