Convert E2AF(hexadecimal)to base 10(decimal)

Hello, I'm new to MatLab and wanted a little help with the question in the title.
>> hex2dec(E2AF)
using
>> hexStr=E2AF
but it keeps returning this error:
Unrecognized function or variable 'E2AF'.
Let me know if you think you could help! I woud really appreciate it!

답변 (1개)

Walter Roberson
Walter Roberson 2020년 2월 4일

1 개 추천

dec2hex('E2AF')
or
sscanf('E2Af', '%x')
or starting in R2019b,
0xE2AF %hex constants are accepted!

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

태그

질문:

2020년 2월 4일

답변:

2020년 2월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by