Simulink Reference Previous page   Next Page
MinMax

Output the minimum or maximum input value

Library

Math Operations

Description

The MinMax block outputs either the minimum or the maximum element or elements of the inputs. You can choose the function to apply by selecting one of the choices from the Function parameter list.

If the block has one input port, the input must be a scalar or a vector. The block outputs a scalar equal to the minimum or maximum element of the input vector.

If the block has multiple input ports, the nonscalar inputs must all have the same dimensions. The block expands any scalar inputs to have the same dimensions as the nonscalar inputs. The block outputs a signal having the same dimensions as the input. Each output element equals the minimum or maximum of the corresponding input elements.

Data Type Support

The MinMax block accepts and outputs real signals of any data type supported by Simulink, except Boolean. The MinMax block supports fixed-point data types.

For a discussion on the data types supported by Simulink, refer to Data Types Supported by Simulink in the Using Simulink documentation.

Parameters and Dialog Box

The Main pane of the MinMax block dialog appears as follows:

Function
Specify whether to apply the function min or max to the input.
Number of input ports
Specify the number of inputs to the block.
Enable zero crossing detection
Select to enable zero crossing detection to detect minimum and maximum values. For more information, see Zero Crossing Detection in the Using Simulink documentation.
Sample time (-1 for inherited)
Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See Specifying Sample Time in the online documentation for more information.

The Signal data types pane of the MinMax block dialog appears as follows:

Require all inputs to have same data type
Select this parameter to require that all inputs must have the same data type.
Output data type mode
Specify the output data type and scaling by choosing a built-in data type from the drop-down list, or inherit the data type and scaling by an internal rule or by backpropagation. Lastly, if you select Specify via dialog, the Output data type, Output scaling value, and Lock output scaling against changes by the autoscaling tool parameters become visible.
Output data type
Specify any data type, including fixed-point data types. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
Output scaling value
Set the output scaling using binary point-only or [Slope Bias] scaling. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
Lock output scaling against changes by the autoscaling tool
Select to lock scaling of outputs. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
Round integer calculations toward
Select the rounding mode for fixed-point operations.
Saturate on integer overflow
Select to have overflows saturate.

Characteristics

Direct Feedthrough
Yes
Sample Time
Specified in the Sample time parameter
Scalar Expansion
Yes, of the inputs
Dimensionalized
Yes
Zero Crossing
Yes, if enabled.


Previous page  Merge MinMax Running Resettable Next page

© 1994-2005 The MathWorks, Inc.