How do I convert a hexadecimal input from the user into binary form?
이전 댓글 표시
this is the piece of code I am having trouble with:
h = input('Enter a hexadecimal string: ');
d = hex2dec(h);
b = dec2bin(d);
but this code doesn't produce the exact binary representation of the input for large hexadecimal strings. is there a way of converting hex to binary directly? also I'm using the Matlab R2010a student version, so please give me solutions compatible with this version only. Thank you
답변 (1개)
Azzi Abdelmalek
2014년 3월 30일
Example
h='555F'
d = hex2dec(h)
b = dec2bin(d)
Now, what do you mean: I have trouble with this
댓글 수: 2
Sahana Sridhar
2014년 3월 30일
sidra rahim
2019년 2월 2일
Did you find any solution for this problem?
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!