MATLAB Functions Help Desk

hex2dec

Purpose

IEEE hexadecimal to decimal number conversion

Syntax

Description

d = hex2dec('hex_value') converts hex_value to its floating-point integer representation. The argument hex_value is a hexadecimal integer stored in a MATLAB string. If hex_value is a character array, each row is interpreted as a hexadecimal string.

Examples

hex2dec('3ff') is 1023.

For a character array S

See Also

dec2hex     Decimal to hexadecimal number conversion

format      Control the output display format

hex2num     Hexadecimal to double number conversion

sprintf     Write formatted data to a string



[ Previous | Help Desk | Next ]