Convert a double-precision system to single precision
Convert System to Single Precision
This example shows how to convert a double-precision system to single precision.
Open the system to convert to single precision.
DataTypeWorkflow.Single.convertToSingle method to convert the system from double precision to single precision.
report = DataTypeWorkflow.Single.convertToSingle('ex_fuel_rate_calculation');
Updating Model Advisor cache... Model Advisor cache updated. For new customizations, to update the cache, use the Advisor.Manager.refresh_customizations method.
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.
systemToConvert — System to convert to single precision
The system to convert from double-precision to single-precision, specified as a character vector. The system must be open before using this method.
ConversionReport — Report containing results from the conversion
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.
Introduced in R2016b