How can I convert zero number to modified hexadecimal in formatting strings?
4 views (last 30 days)
Show older comments
hassan mosakazemi
on 22 Dec 2013
Commented: hassan mosakazemi
on 24 Dec 2013
IN THE NAME OF GOD
Hi.
>> sprintf('%#.2X', 0)
ans =
00
but I want a modified hexadecimal such as following:
ans =
0X00
Note: This works correctly for positive integers. See bellow:
>> sprintf('%#.2X', 1)
ans =
0X01
Thanks.
Mosakazemi
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!