Documentation Center

  • Trial Software
  • Product Updates

Design Minimum and Maximum

Use of Design Minimum and Maximum

You can specify the design minimum and maximum for model data such as blocks and data objects. Simulink® uses the design minimum and maximum as follows.

  • To define a valid range for Simulink parameters and signals and use it in range-checking

  • To calculate best-precision scaling for fixed-point data types

  • To calculate derived minimum and maximum for model data for which design minimum and maximum are not specified

Valid Values for Design Minimum and Maximum

Simulink no longer allows you to specify the design minimum and maximum as -Inf/Inf. The default design minimum or maximum is [].

Previously, you could specify the design minimum and maximum as -Inf/Inf. However, this specification is ambiguous.

It may imply that the design minimum and maximum are explicitly specified; in other words, it may imply that the parameter or signal can have any value. It may also imply that the design minimum and maximum are unspecified. While this ambiguity may not have a significant effect on range-checking, it could affect the calculation of derived minimum and maximum or the checking of data type validity.

    Note:   Simulink generates an error or warning when you specify the design minimum and maximum as -Inf/Inf.

Avoiding Specifying Infinite Design Minimum or Maximum

There are three sources for the warning Simulink generates if the design minimum and/or maximum are set to -Inf/Inf. Each source requires a different solution.

  1. MATLAB® code

    1. Use error handling tools such as dbstop and lastwarn to locate the MATLAB code that is setting the design minimum and maximum to -Inf/Inf.

    2. Either remove these lines of code from the MATLAB file or replace instances of -Inf and Inf with [].

  2. MAT-file: Resave the MAT-file

  3. SLX file: Resave the SLX file

Was this topic helpful?