Engee documentation

Maximum

The maximum values of the input data or the sequence of input data.

blockType: Maximum

Path in the library:

/Signal Operations/Statistics/Maximum

Description

Block Maximum defines the value and position of the largest element in each row or column of input data or along vectors of a given input size. It can also calculate the maximum value of the entire input signal.

The Mode parameter defines the operating mode of the unit and can be set to one of the following values:

  • Value — the unit outputs the maximum values in the specified dimension.

  • Index — the block outputs an array of indexes with maximum values in the specified dimension.

  • Value and Index — the block outputs the maximum values and the corresponding array of indexes in the specified dimension.

You can specify the size using the Find the maximum value over parameter.

Ports

Entrance

In — data entry
vector | the matrix

The block accepts multi-channel and multidimensional input data with a real or complex value. The input data can be floating point or boolean.

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

Support for complex numbers: Yes

Output

Val — maximum values for the specified pass size:q[<br>] scalar | vector | the matrix

The data type of the maximum value corresponds to the input data type.

If the Mode parameter is set to either Value and Index, or Value, the following applies:

  • The size of the dimension for which the block calculates the maximum value is 1. The dimensions of all other dimensions match the dimensions of the input array. For example, when the input signal is an array M by N by P with a size set to 1, the block outputs an array of 1 by N by P. When the dimension is set to 3, the block outputs a two - dimensional matrix M to N.

  • When the input signal is an M by N matrix with the size set to 1, the block outputs a 1-by - N matrix .

If you specify a block to calculate the maximum value for all input data, the block will return a scalar.

Data types: Float64

Idx is the index of maximum values along the specified pass dimension:q[<br>] scalar | vector | the matrix

When the input data is double, the index values are also doubled.

Dependencies

To use this port, set the Mode parameter to either Value and Index, or Value.

Data types: Float64

Parameters

Main

Mode — the mode in which the pass block operates:q[<br>] Value and Index (by default) | Value | Index

When the Mode parameter is set to:

  • Value — The block calculates the maximum value in each row or column of input data or along vectors of a given input data size. It can also calculate the maximum value of all input data at each sampling moment and outputs an array . Each element in the output data is the maximum value in the corresponding column, row, vector, or in all input data. Conclusion depends on the setting of the Find the maximum value over parameter. Consider a three-dimensional input signal of size M by N by P. Find the maximum value over is set to:

    • Each row — output data At each moment, the samples consist of an array M by 1 by P, where each element contains the maximum value of each vector in the second dimension of the input data. For the input data of an M by N matrix, the output data at each sampling moment is an M by 1 column vector.

    • Each column — output data At each moment, the samples consist of an array of size 1 by N by P, where each element contains the maximum value of each vector in the first dimension of the input data. For an input matrix of size M by N, the output signal at each sampling moment is a vector of rows of size 1 by N.

      In this mode, the block processes the input data of undirected vectors of length as column vectors of size M by 1.

    • Entire input — withdrawal at each moment of the sample, it is a scalar that contains the maximum value in the input matrix M by N by P.

    • Specified dimension — output signal at each moment of the sample, it depends on the size. If the value is set for the measurement 1 the output data will be the same as when selecting each column. If the dimension is set to 2 the output data will be the same as when selecting each row. If the dimension is set to 3, then the output data at each sampling moment is an M by N matrix containing the maximum value of each vector in the third dimension of the input data.

Comprehensive input data

For complex input data, the block selects a value in each row or column of input data along the vectors of a given input data size or the entire input signal, which has a maximum value squared, as shown in the following figure. For a complex value the square of the value is .

maximum im

  • Index — the block calculates the maximum value in each row or column of input data along vectors of a given input data size or the entire input signal and outputs an array of indexes . Each element in is an integer that indexes the maximum value in the corresponding column, row, vector, or the entire input. Result depends on the setting of the Find the maximum value over parameter. Consider a three-dimensional input signal of size M by N by P:

    • Each row — withdrawal At each moment, the sample consists of an array M by 1 by P, where each element contains the index of the maximum value of each vector in the second dimension of the input data. For the input data, which is an M by N matrix, the output data at each sampling point is an M by 1 column vector.

    • Each column — withdrawal At each moment, the sample consists of an array of size 1 by N by P, where each element contains the index of the maximum value of each vector in the first dimension of the input data. For the input data, which is an M by N matrix, the output data at each sampling point is a vector of rows 1 by N.

      In this mode, the block processes the input data of undirected vectors of length as column vectors of size M by 1.

    • Entire input — withdrawal at each moment of the sample, it is a vector of size 1 by 3, which contains the location of the maximum value in the input matrix M by N by P. For the input data, which is an M by N matrix, the output data is a 1 by 2 vector.

    • Specified dimension — withdrawal at each moment of the sample, it depends on the size. If the value is set for the measurement 1 the output data will be the same as when selecting each column. If the dimension is set to 2 the output data will be the same as when selecting each row. If the dimension is set to 3, then the output data at each sampling moment is an M by N matrix containing the indices of the maximum values of each vector in the third dimension of the input data.

When the maximum value occurs more than once, the calculated index corresponds to the first occurrence. For example, when the input data is a column vector [3 2 1 2 3]', the calculated index of the maximum value based on the unit is 1 rather than 5 when selected Each column.

  • Value and Index — the block outputs the maximum value in each row or column of input data along the vectors of the specified input data dimension or the entire input signal and the corresponding array of indexes .

Find the maximum value over — the measurement by which the block calculates the maximum value of
Each column (by default) | Each row | Entire input | Specified dimension

Each column — the block outputs the maximum value for each column.

Each row — the block outputs the maximum value for each row.

Entire input — the block outputs the maximum value for the entire input.

Specified dimension — the block outputs the maximum value compared to the size specified in the Dimension parameter.

Dependencies

To use this option, set Mode to Index, on Value, or on Value and Index.

Dimension — custom dimension of
1 (default) | scalar

Specify the dimension (the value based on the unit) of the input signal from which the block calculates the maximum. 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 Find the maximum value over to Specified dimension.