Engee documentation

Mean

The average value of the input data or a sequence of input data.

mean 1

Description

The Mean block calculates the average of each row, column, or vector of a given dimensionality of the input data. It can also calculate the mean value of the entire input signal. The dimensionality can be set using the Find the mean value over parameters.

Ports

Input

Port_1 - data input
scalar | vector | matrix | multidimensional array

An input signal given as real or complex multichannel and multidimensional input data, of dimension to , where and .

Data types: Float16 | Float32 | Float64 | Int8 | Int16 | Int32 | Int64 | Int128 | UInt8 | UInt16 | UInt32 | UInt64 | UInt128

Support for complex numbers

Yes

Output

Port_1 - average value for the specified measurement
scalar | vector | matrix | multidimensional array

Calculated average value. The output data type is the same as the input data type.

Consider a three-dimensional input signal of size by by . If we set the Find the mean value over parameters to:

  • Entire input - the output signal at each sampling time is a scalar containing the mean value of the input array to to .

  • Each row - the output at each sampling time consists of the array to to , where each element contains the average of each vector over the second dimension of the input. For the input matrix to , the output at each sampling time is a column vector to .

  • Each column - the output at each sampling time consists of an array to to , where each element contains the average value of each vector along the first dimensionality of the input. For the input matrix to , the output at each sampling time is a vector of to rows. In this mode, the block treats undirected vector inputs of length as vectors of by columns.

  • Specified dimension - the output at each sampling time depends on the value of the Dimension parameters.

    • If the Dimension parameter is set to 1, the output will be the same as when the Each column value of the Find the mean value over parameter is selected.

    • If the Dimension parameters are set to 2, the output will be the same as when Each row is selected.

    • If 3 is set for the Dimension parameters, the output at each sampling time will be a matrix at , containing the mean value of each vector along the third dimension of the input data.

Data types

Float16 | Float32 | Float64 | Int8 | Int16 | Int32 | Int64 | Int128 | UInt8 | UInt16 | UInt32 | UInt64 | UInt128

Support for complex numbers

Yes

Parameters

Main

Find the mean value over - the dimension on which the block calculates the mean value
Each column (by default) | Entire input | Each row | Specified dimension
  • Each column - the block outputs the average value for each column.

  • Entire input - block outputs the average value for each row.

  • Each row - the block outputs the average value for the whole input.

  • Specified dimension - block outputs the average value for the dimension specified in the Dimension parameters.

Dimension - dimension
1 (By default) | scalar.

Set the dimension (value counted from one) of the input signal, by which the average value is calculated. The value of this parameter must be and less than the dimension of the input signal.

Dependencies

To use this parameter, set the Find the mean value over parameter to Specified dimension.