Engee documentation

Minimum

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

minimum

Description

The Minimum block determines the value and position of the smallest element in each row or column of the input data, or along vectors of a given input data size. It can also calculate the minimum value of the entire input signal. The Mode parameter defines the mode of the block and can be set to one of the following values:

  • Value - the block outputs the minimum values in the specified dimension.

  • Index - the block outputs an array of indexes with minimum values in the specified dimension.

  • Value and Index - the block outputs the minimum values and the corresponding index array in the specified dimension.

You can specify the dimension using the Find the minimum value over parameter.

Ports

Input

In - data input
vector | matrix

The block accepts multichannel and multidimensional input data with real or complex value. Input data can be floating point or logical.

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

Output

Val - minimum values for the specified dimension
scalar | vector | matrix

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

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

  • The dimension of the dimension for which the block calculates the minimum value is 1. The dimensions of all other dimensions are the same as the dimensions of the input array. For example, when the input is an array M by N by P with dimension 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 by N.

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

If you specify the block to calculate the minimum value over all inputs, the block outputs a scalar.

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

Idx - index of minimum values along the specified dimension
scalar | vector | matrix

When the input data is double, the index values are also doubled. Otherwise index values are equal to UInt32.

Dependencies

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

Data types: Float64.

Parameters

Main

Mode - mode in which the block works
Value and Index (by default) | Value | Index

When the Mode parameter is set to:

  • Value - the block calculates the minimum value in each row or column of the input data along vectors of the specified input data size or the entire input signal at each sampling time and outputs the array . Each element in is the minimum value in the corresponding column, row, vector, or all input data. The output y depends on the setting of Find the minimum value over. Consider a three-dimensional input signal of size M by N on P. Find the minimum value over is set to:

    • Each row - the output data at each sampling time consists of an M by 1 array on P, where each element contains the minimum value of each vector along the second dimension of the input data. For an M by N matrix input data, the output data at each sampling time is the M by 1 column vector.

    • Each column - the output data at each sampling time consists of an array of size 1 by N by P, where each element contains the minima value of each vector along the first dimension of the input data. For an input matrix of size M by N, the output at each sampling instant 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 vectors of columns of size M by 1.

    • Entire input - the output of at each sampling moment is a scalar that contains the minima value in the input matrix of M by N by P.

    • Specified dimension - the output of at each sampling time is dimension dependent. If the dimension is set to 1, the output is the same as when each column is sampled. If the dimension is set to 2, the output will be the same as when each row is selected. If the dimension is set to 3, the output data at each sampling time is an M by N matrix containing the minimum value of each vector along the third dimension of the input data.

*Complex input data.

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

+ maximum im

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

    • Each row - the output of at each sampling time consists of an M by 1 array on P, where each element contains the index of the minimum value of each vector along the second dimension of the input data. For the input data, which is an M by N matrix, the output at each sampling time is an M by 1 column vector.

    • Each column - the output of at each sampling time consists of a 1 by N by P array, where each element contains the index of the minimum value of each vector along the first dimension of the input data. For the input data, which is an M by N matrix, the output at each sampling time is a 1 by N vector of rows.

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

    • Entire input - the output of at each sampling time represents a vector of size 1 by 3 that contains the location of the minimum value in the input matrix M by N by P. For input data that is an M by N matrix, the output is a 1 by 2 vector.

    • Specified dimension - The output of at each sampling point is dimension dependent. If the dimension is set to 1, the output is the same as when each column is selected. If the dimension is set to 2, the output will be the same as when each row is selected. If the dimension is set to 3, the output data at each sampling time is an M by N matrix containing the indices of the minimum values of each vector along the third dimension of the input data.

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

  • Value and Index - the unit outputs the minimum value in each row or column of the input data along vectors of a given dimension of the input data or the entire input and the corresponding index array .

Find the minimum value over - the dimension by which the block calculates the minimum value
Each column (by default) | Each row | Entire input | Specified dimension

Each column - the block outputs the minimum value for each column.

Each row - block outputs the minimum value for each row.

Entire input - block outputs the minimum value for the whole input.

Specified dimension - the block outputs the minimum value compared to the size specified in the Dimension parameter.

Dependencies

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

Dimension - custom dimensionality
1 (By default) | scalar.

Specify the dimension (unit-based value) of the input signal from which the block calculates the minimum. The value of this parameter must be greater than 0 and less than the number of dimensions in the input signal.

Dependencies

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