How do I convert a hexadecimal input from the user into binary form?
3 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Oceanography and Hydrology についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!