%% Convert Hexadecimal Representations of Negative Number, NaN, and Inf
% Create a character vector that represents a negative number. Then convert it.

hexStr = 'BFF';
X = hex2num(hexStr)

%
% Convert a representation of NaN.

hex2num('FFF8')

%
% Convert a representation of Inf.

hex2num('7FF')

% Copyright 2019 The MathWorks, Inc.