convertting from char or double to hex ?
3 次查看(过去 30 天)
显示 更早的评论
Hi, i have a vector which is zeros and ones say A=[1 0 1 0 0 0 1 0] its type is double and i want to convert it to hexadecimal representation i,e the result would be : A2
0 个评论
采纳的回答
Walter Roberson
2013-4-3
hextable = '0123456789ABCD';
hextable( A(1:4:end) * 8 + A(2:4:end) * 4 + A(3:4:end) * 2 + A(4:4:end) + 1 )
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!