Convert ASCII to HEX

5 次查看(过去 30 天)
Bakka
Bakka 2014-1-31
评论: Bakka 2014-1-31
Hi everyone, I have character ASCII, exp. pass1234 but I wan't to convert it into HEX, I've tried to convert online through this site http://www.branah.com/ascii-converter . The result is 7061737331323334
But I wan't make program that pass1234 from matlab code,there is edit text box and button to convert it, is there any solutions?please let me know, many thanks

采纳的回答

Walter Roberson
Walter Roberson 2014-1-31
h = uicontrol('Style', 'edit', 'String', 'pass1234');
and later
pass = get(h, 'String');
hexpass = sprintf('%02X', pass+0);
  1 个评论
Bakka
Bakka 2014-1-31
thanks Mr. Walter, finally I got how to convert it.
str='pass1234';
a=sprintf('%X', str);
display(a);

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by