Table Of Contents

Max and Min (Multirate Dataflow)

Last Modified: January 23, 2017

Compares two values and returns the maximum and minimum values.

connector_pane_image
datatype_icon

x

The value to compare. x must be of the same data type as y.

Data Type Changes on FPGA

When you add this node to a document targeted to an FPGA, this input has a default data type that uses fewer hardware resources at compile time.

datatype_icon

y

The value to compare. y must be of the same data type as x.

Data Type Changes on FPGA

When you add this node to a document targeted to an FPGA, this input has a default data type that uses fewer hardware resources at compile time.

datatype_icon

max

The larger value.

Data Type Changes on FPGA

When you add this node to a document targeted to an FPGA, this output has a default data type that uses fewer hardware resources at compile time.

datatype_icon

min

The smaller value.

Data Type Changes on FPGA

When you add this node to a document targeted to an FPGA, this output has a default data type that uses fewer hardware resources at compile time.

Behavior with Array Inputs

When using Max and Min to compare arrays, you can select a comparison mode. Note that Max and Min produces a different type of output than other Comparison nodes in each of the two comparison modes. In Compare Elements mode, rather than returning an array of Boolean values, Max and Min returns an array of the maximum elements and/or minimum elements. In Compare Aggregates mode, rather than returning a single Boolean value, Max and Min returns the maximum array and/or minimum array.

Parameters Compare Elements Comments Compare Aggregates Comments
First input array (x) [3,2,3,4] [3,2,3,4]
Second input array (y) [2,3,4,5] [2,3,4,5]
Maximum (max) [3,3,4,5] The node returns an array of the maximum elements from the two input arrays. [3,2,3,4] Because the first elements of the two input arrays are not equal, and because 3>2, the node stops and returns [3,2,3,4] as the maximum array.
Minimum (min) [2,2,3,4] The node returns an array of the minimum elements from the two input arrays. [2,3,4,5] Because the first elements of the two input arrays are not equal, and because 2<3, the node stops and returns [2,3,4,5] as the minimum array.

Where This Node Can Run:

Desktop OS: Windows

FPGA: All devices


Recently Viewed Topics