Mean
The average value of the input data or sequence of input data.
blockType: Mean
Path in the library:
|
Description
Block Mean calculates the average value of each row, column, or vector of a given input dimension. It can also calculate the average of the entire input signal. The dimension can be set using the parameter Find the mean value over.
Ports
Input
#
IN_1
—
input data
scalar | vector | the matrix | multidimensional array
Details
An input signal defined as real or complex multi-channel and multidimensional input data, with the dimension on , where and .
| Data types |
|
| Complex numbers support |
Yes |
Output
#
OUT_1
—
the average value for the specified measurement
scalar | vector | the matrix | multidimensional array
Details
Calculated average value. The output data type is the same as the input data type.
Consider a three-dimensional input signal with the size on on . If set for the parameter Find the mean value over meaning:
-
Entire input— the output signal at each time point of the sample is a scalar containing the average value of the input array. on on . -
Each row— the output signal at each sampling time consists of an array on on , where each element contains the average value of each vector in the second dimension of the input. For the input matrix on The output signal at each time point of the sample is a column vector on . -
Each column— the output signal at each sampling time consists of an array on on , where each element contains the average value of each vector in the first dimension of the input. For the input matrix on the output signal at each time point of the sample is a vector string on . In this mode, the block considers input undirected vectors of length as column vectors on . -
Specified dimension— the output signal at each moment of the sampling time depends on the value of the parameter Dimension:-
If for the parameter Dimension the value is set
1, the output signal will be the same as when selecting the valueEach columnfor the parameter Find the mean value over. -
If for the parameter Dimension set the value
2, the output signal will be the same as when selecting the valueEach row. -
If for the parameter Dimension set the value
3, then the output at each time point of the sample will be a matrix on , containing the average value of each vector in the third dimension of the input data.
-
| Data types |
|
| Complex numbers support |
Yes |
Parameters
Main
#
Find the mean value over —
the measurement by which the block calculates the average value
Entire input | Each row | Each column | Specified dimension
Details
-
Each column— the block outputs the average value for each column. -
Each row— the block outputs the average value for each row. -
Entire input— The unit outputs the average value of the entire input signal. -
Specified dimension— the block outputs the average value compared to the dimension specified in the parameter Dimension.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Dimension —
dimension
Real number
Details
Specify the dimension (unit-based value) of the input signal from which the block calculates the average value. The value of this parameter must be greater than zero and less than the number of measurements in the input signal.
Dependencies
To use this parameter, set for the parameter Find the mean value over meaning Specified dimension.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |