| Simulink® | ![]() |
Math Operations

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.
The MinMax block accepts and outputs real signals of any data type supported by Simulink® software, except Boolean. The MinMax block supports fixed-point data types.
For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink® in the Simulink documentation.
The Main pane of the MinMax block dialog appears as follows:

Specify whether to apply the function min or max to the input.
Specify the number of inputs to the block.
Select to enable zero crossing detection to detect minimum and maximum values. For more information, see Zero-Crossing Detection .
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 Attributes pane of the MinMax block dialog appears as follows:

Select this parameter to require that all inputs must have the same data type.
Specify the minimum value that the block should output. The default value, [], is equivalent to -Inf. Simulink software uses this value to perform:
Simulation range checking (see Checking Signal Ranges)
Automatic scaling of fixed-point data types
Specify the maximum value that the block should output. The default value, [], is equivalent to Inf. Simulink software uses this value to perform:
Simulation range checking (see Checking Signal Ranges)
Automatic scaling of fixed-point data types
Specify the output data type. You can set it to:
A rule that inherits a data type, for example, Inherit: Inherit via back propagation
The name of a built-in data type, for example, single
The name of a data type object, for example, a Simulink.NumericType object
An expression that evaluates to a data type, for example, float('single')
Click the Show data type assistant button
to display the Data
Type Assistant, which helps you set the Output
data type parameter.
See Specifying Block Output Data Types for more information.
Select to lock scaling of outputs. This parameter is visible only if you enter an expression for the Output data type parameter.
Select the rounding mode for fixed-point operations. For more information, see Rounding in the Simulink® Fixed Point™ User's Guide.
Select to have overflows saturate.
Direct Feedthrough | Yes |
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | Yes, of the inputs |
Dimensionalized | Yes |
Multidimensionalized | Yes |
Zero Crossing | Yes, if enabled. |
![]() | Merge | MinMax Running Resettable | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |