Matlab hex2dec function not converting hex into dec accurately.

조회 수: 1 (최근 30일)
sidra rahim
sidra rahim 2019년 2월 2일
댓글: sidra rahim 2019년 2월 3일
I am trying to convert Hex: C3B829A1E8642B78 in matlab using hex2dec but it is not giving me the correct result. I know the problem is of precision, The answer should have been 14103068008476060536 but matlab is giving 14103068008476060000. I want it to be accurate as I have to use the result for further calculations. Please help.

채택된 답변

Walter Roberson
Walter Roberson 2019년 2월 3일
use sscanf eith %lx format for unsigned 64 bit hex.

추가 답변 (1개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by