MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
Change the datatype of an object in MATLAB Link for Code Composer Studio
Syntax
Description
objname2 = cast(objname,datatype)
returns objname2
, a copy of objname
whose represent
property is changed to the data type specified by datatype
. Input argument datatype
can be any supported datatype. After the cast operation, read
or write
operations apply the appropriate data conversion to implement on the target the datatype specified by the represent
property.
The following datatypes work as input arguments to cast
:
Various TI processors restrict the sizes of the datatypes used by objects in MATLAB Link for Code Composer Studio. Shown in the next table, the processor families restrict the valid word sizes for the listed data types.
Using the properties of the objects, you change the word size by changing the value of the storageunitspervalue
property of the object. Note that you cannot change the bitsperstorageunit
property value which depends on the processor and whether the object represents a memory location or a register.
cast
applies to any object that has the represent
property. function
, ccsdsp
, and rtdx
objects do not use the represent
property and do not support cast
.
objname2 = cast(objname,datatype,size)
returns objname2
, a copy of objname
, with the specified datatype for the represent
property, and the size
property value set to size
.
See Also
![]() | build | ccsboardinfo | ![]() |