| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |

| On this page… |
|---|
Type Conversion Diagnostics Overview Vector/matrix block input conversion |
Specify the diagnostic actions that Simulink software should take when it detects a data type conversion problem while compiling the model.
Set the parameters displayed.
The options are typically to do nothing or to display a warning or an error message.
A warning does not terminate a simulation, but an error does.
Select the diagnostic action to take when Simulink software detects a Data Type Conversion block used where no type conversion is necessary.
Default: none
| Parameter: UnnecessaryDatatypeConvMsg |
| Type: string |
| Value: 'none' | 'warning' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | warning |
Data Type Conversion block
Select the diagnostic action to take when Simulink software detects a vector-to-matrix or matrix-to-vector conversion at a block input.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
Simulink software converts vectors to row or column matrices and row or column matrices to vectors under the following circumstances:
If a vector signal is connected to an input that requires a matrix, Simulink software converts the vector to a one-row or one-column matrix.
If a one-column or one-row matrix is connected to an input that requires a vector, Simulink software converts the matrix to a vector.
If the inputs to a block consist of a mixture of vectors and matrices and the matrix inputs all have one column or one row, Simulink software converts the vectors to matrices having one column or one row, respectively.
| Parameter: VectorMatrixConversionMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if Simulink software detects a 32-bit integer value was converted to a floating-point value.
Default: warning
Converting a 32-bit integer value to a floating-point value can result in a loss of precision. See Working with Data Types for more information.
| Parameter: Int32ToFloatConvMsg |
| Type: string |
| Value: 'none' | 'warning' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | warning |
Specifies diagnostic action to take when a fixed-point constant underflow occurs during simulation.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
This diagnostic applies only to fixed-point constants (net slope and net bias).
Fixed-point constant underflow occurs when Simulink software encounters a fixed-point constant whose data type does not have enough precision to represent the ideal value of the constant because the ideal value is too small.
When fixed-point constant underflow occurs, casting the ideal value to the data type causes the value of the fixed-point constant to become zero, and therefore to differ from its ideal value.
This parameter requires a Simulink Fixed Point license.
| Parameter:FixptConstUnderflowMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Specifies diagnostic action to take when a fixed-point constant precision loss occurs during simulation.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
This diagnostic applies only to fixed-point constants (net slope and net bias).
Precision loss occurs when Simulink software converts a fixed-point constant to a data type which does not have enough precision to represent the exact value of the constant. As a result, the quantized value differs from the ideal value.
Fixed-point constant precision loss differs from fixed-point constant overflow. Overflow occurs when the range of the parameter's data type, that is, the maximum value that it can represent, is smaller than the ideal value of the parameter.
This parameter requires a Simulink Fixed Point license.
| Parameter:FixptConstPrecisionLossMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Specifies diagnostic action to take when a fixed-point constant overflow occurs during simulation.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
This diagnostic applies only to fixed-point constants (net slope and net bias).
Overflow occurs when the Simulink software converts a fixed-point constant to a data type whose range is not large enough to accommodate the ideal value of the constant. The ideal value is either too large or too small to be represented by the data type. For example, suppose that the ideal value is 200 and the converted data type is int8. Overflow occurs in this case because the maximum value that int8 can represent is 127.
Fixed-point constant overflow differs from fixed-point constant precision loss. Precision loss occurs when the ideal fixed-point constant value is within the range of the data type and scaling being used, but cannot be represented exactly.
This parameter requires a Simulink Fixed Point license.
| Parameter:FixptConstOverflowMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
![]() | Diagnostics Pane: Data Validity | Diagnostics Pane: Connectivity | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |