Conversion Operations ===================== char ---- **Syntax** :: char(x) **Description** Converts the operand ``x`` to a character data type. If ``x`` is an array, it will interpret each element within the array as a character. Inputs to this function must be concrete. double ------ **Syntax** :: double(x) **Description** Converts the operand ``x`` to a real data type. If ``x`` is an array, it will convert each element within the array to a real value. This function accepts inputs where the type may be strings, numerical, or logcial values. int ----- **Syntax** :: int(x, w) **Description** Converts operand ``x`` to an integer data type with ``w`` bits wide. If ``x`` is an array, it will convert each element within the array to a ``w`` bit wide integer. - Values outside the allowable range, given ``w`` bits, will be clamped to the maximum or minimum integer that can be represented in ``w`` bits. int16 ----- **Syntax** :: int16(x) **Description** Converts operand ``x`` to an 16 bit wide integer data type. If ``x`` is an array, it will convert each element within the array to a 16 bit wide integer. - Values that fall outside the allowable range will be clamped to the maximum or minimum integer that can be represented in 16 bits. int32 ----- **Syntax** :: int32(x) **Description** Converts operand ``x`` to an 32 bit wide integer data type. If ``x`` is an array, it will convert each element within the array to a 32 bit wide integer. - Values that fall outside the allowable range will be clamped to the maximum or minimum integer that can be represented in 32 bits. int64 ----- **Syntax** :: int64(x) **Description** Converts operand ``x`` to an 64 bit wide integer data type. If ``x`` is an array, it will convert each element within the array to a 64 bit wide integer. - Values that fall outside the allowable range will be clamped to the maximum or minimum integer that can be represented in 64 bits. num2str ------- **Syntax** :: num2str(x) **Description** Converts a numeric operand ``x`` to a character array. Each row in the input array is mapped to a row in the output. The entries are aligned by columns with spacing is added as needed to right justify the entries. uint ----- **Syntax** :: uint(x, w) **Description** Converts operand ``x`` to an unsigned integer data type with ``w`` bits wide. If ``x`` is an array, it will convert each element within the array to a ``w`` bit wide unsigned integer. - Values that fall outside the allowable range will be clamped to the maximum or minimum integer that can be represented in ``w`` bits. uint16 ------ **Syntax** :: uint16(x) **Description** Converts operand ``x`` to an 16 bit wide unsigned integer data type. If ``x`` is an array, it will convert each element within the array to a 16 bit wide unsigned integer. - Values that fall outside the allowable range will be clamped to the maximum or minimum integer that can be represented in 16 bits. uint32 ------ **Syntax** :: uint32(x) **Description** Converts operand ``x`` to an 32 bit wide unsigned integer data type. If ``x`` is an array, it will convert each element within the array to a 32 bit wide unsigned integer. - Values that fall outside the allowable range will be clamped to the maximum or minimum integer that can be represented in 32 bits. uint64 ------ **Syntax** :: uint64(x) **Description** Converts operand ``x`` to an 64 bit wide unsigned integer data type. If ``x`` is an array, it will convert each element within the array to a 64 bit wide unsigned integer. - Values that fall outside the allowable range will be clamped to the maximum or minimum integer that can be represented in 64 bits. hex2dec ------- **Syntax**:: hex2dec('hexValue') **Description** Converts a hexidecimal number string to its decimal number. str2func -------- **Syntax**:: str2func('functionName') **Description** Constructs a function handle to the function identified by the input string ``functionName.``