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.

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

  • Value — the block 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 dimension by which the block calculates the maximum value using the parameter Find the maximum value over.

Ports

Input

# IN_1 — input data
vector | the matrix

Details

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

Data types

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

Complex numbers support

Yes

Output

# Val — maximum values for the specified size
scalar | vector | the matrix

Details

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

If for the parameter Mode the value 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 equal to 1. The dimensions of all other dimensions match the dimensions of the input array. For example, when the input signal is an array on on with the size set in 1, the block outputs an array on on . When the dimension is set to 3, the block outputs a two - dimensional matrix on .

  • When the input signal is a matrix on with the size set in 1, the block outputs a matrix on .

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

Dependencies

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

Data types

Float64

Complex numbers support

I don’t

# Idx — index of maximum values along the specified dimension
scalar | vector | the matrix

Details

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

Dependencies

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

Data types

Float64

Complex numbers support

I don’t

Parameters

Main

# Mode — block operation mode
Value | Index | Value and Index

Details

When for the parameter Mode the value is set:

  • Value — The block calculates the maximum value in each row or each 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 output 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 parameter setting Find the maximum value over. Consider a three-dimensional input signal of the size on on . If for the parameter Find the maximum value over the value is set:

    • Each row — output data at each moment, the samples consist of an array on on , where each element contains the maximum value of each vector in the second dimension of the input data. For the input data of the matrix on the output data at each moment of the sample is a column vector on .

    • Each column — output data at each moment, the samples consist of an array of the size on on , where each element contains the maximum value of each vector in the first dimension of the input data. To enter a matrix of size on The output signal at each sampling moment is a vector string of the size on .

      In this mode, the block processes the input data of undirected vectors of length as column-sized vectors on .

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

    • 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 a matrix on , containing the maximum value of each vector in the third dimension of the 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 It is an integer that indexes the maximum value in the corresponding column, row, vector, or the entire input signal. Result depends on the parameter setting Find the maximum value over. Consider a three-dimensional input signal of the size on on :

    • Each row — withdrawal at each moment of the selection, it consists of an array on on , 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 a matrix on the output data at each sampling moment is a column vector on .

    • Each column — withdrawal at each moment of the selection, it consists of an array of the size on on , 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 a matrix on , the output data at each moment of the sample is a vector string on .

      In this mode, the block processes the input data of undirected vectors of length as column-sized vectors on .

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

    • 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 a matrix on , 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 for the parameter Find the maximum value over the value is set 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 .

Values

Value | Index | Value and Index

Default value

Value and Index

Program usage name

Mode

Tunable

No

Evaluatable

No

# Find the maximum value over — the measurement by which the block calculates the maximum value
Entire input | Each row | Each column | Specified dimension

Details
  • 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 unit outputs the maximum value for the entire input signal.

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

Values

Entire input | Each row | Each column | Specified dimension

Default value

Each column

Program usage name

FindTheMaximumValueOver

Tunable

No

Evaluatable

No

# Dimension — custom dimension
Int64 integer

Details

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 for the parameter Find the maximum value over meaning Specified dimension.

Default value

1

Program usage name

Dimension

Tunable

No

Evaluatable

Yes