Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Max & Min

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Compares x and y and returns the larger value at the top output terminal and the smaller value at the bottom output terminal. This function accepts time stamp values if all inputs are time stamp values. If the inputs are time stamp values, the function returns the later time at the top and the earlier time at the bottom. The wire is broken if the inputs are not the same data type. You can change the comparison mode of this function.

The connector pane displays the default data types for this polymorphic function.

Examples

x and y must be of the same type.
max(x, y) is the larger value. When you compare arrays in Compare Elements mode (default), this function compares corresponding elements in each input array and returns the element with the maximum value. max(x, y) is an array consisting of the maximum value elements. When you compare arrays in Compare Aggregates mode, this function compares corresponding elements in each input array starting at the beginning of the array. When this function reaches a pair of unequal corresponding elements, max(x, y) returns the array that has the greater value for that element.
min(x, y) is the smaller value. When you compare arrays in Compare Elements mode (default), this function compares corresponding elements in each input array and returns the element with the minimum value. min(x, y) is an array consisting of the minimum value elements. When you compare arrays in Compare Aggregates mode, this function compares corresponding elements in each input array starting at the beginning of the array. When this function reaches a pair of unequal corresponding elements, min(x, y) returns the array that has the smaller value for that element.

Examples

Refer to the following VIs for examples of using the Max & Min function:

  • Temperature Analysis VI: labview\examples\general\arrays.llb
  • Max & Min VI: labview\examples\general\functions\Comparison

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit