The bin2dec
function issues a warning when input values are greater than or equal to flintmax
. In previous releases, bin2dec
did not issue this warning.
bin2dec
now issues a warning because inputs representing
integers greater than or equal to flintmax
might not be represented
exactly as double-precision floating-point values.
To convert values greater than flintmax
exactly, consider one of
these alternatives:
In place of scalar text inputs, use hexadecimal or binary literals
representing the same values. When you write a value as a literal, MATLAB® stores it as an integer that represents the value exactly. For
more information, see Hexadecimal and Binary Values.
To convert hexadecimal inputs greater than flintmax
, you
can use the sscanf
function with the
%lx
operator. When you use %lx
, the
converted values are integers that have the uint64
data type.
These integers have enough storage to represent values greater than
flintmax
exactly.
.