Matlab hexadecimal definition of a variable

2 views (last 30 days)
Hi, I'm using MATLAB 2019a.
I want to define a variable in hexadecimal as shown below but it gaves me "invalid expression" error.
a = 0x7C
How can I do that?
Thanks.

Answers (1)

Stephen23
Stephen23 on 4 Feb 2020
>> a = sscanf('0x7C','%x')
a = 124

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!