convertDataType
Description
convertDataType(
converts the data in the sigObj
,dataType
)Simulink.sdi.Signal
object
sigObj
to the specified data type dataType
.
The convertDataType
function supports converting to all built-in
data types. For more information, see Data Types Supported by Simulink. When you have a license for Fixed-Point Designer™, you can also convert to fixed-point data types defined using the fixdt
function.
You cannot convert the data type for a signal produced by logging simulation data while the simulation that produces the signal is in progress.
Warning
You cannot undo a data type conversion in the Simulation Data Inspector. Some data types allow more precision in the stored data values than others. Conversion to a data type with less precision can result in permanent loss of precision in data values.
Examples
Input Arguments
Version History
Introduced in R2022a