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 Center および File ExchangeEnvironment and Settings についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by