Main Content


Convert a double-precision system to single precision



ConversionReport = DataTypeWorkflow.Single.convertToSingle(systemToConvert) converts the system specified by systemToConvert to single precision and returns a report. Data types that are specified as Boolean, fixed point, or one of the built-in integers are not affected by conversion.


collapse all

  1. Open the system to convert to single precision.


  2. Use the DataTypeWorkflow.Single.convertToSingle method to convert the system from double precision to single precision.

    report = DataTypeWorkflow.Single.convertToSingle('ex_fuel_rate_calculation')
    The specified system now uses single-precision data types instead of double-precision data types. Data types in the model that were specified as Boolean, fixed-point, or one of the built-in integers remain the same after conversion.

Input Arguments

collapse all

The system to convert from double-precision to single-precision, specified as a character vector. The system must be open before using this method.

Data Types: char

Output Arguments

collapse all

Report containing results from the conversion.


You can also use the Single Precision Converter app to convert a system from double precision to single precision. To open the Single Precision Converter app, in the Simulink® Apps tab, select Single Precision Converter. For more information, see Getting Started with Single Precision Converter.

Version History

Introduced in R2016b