Convert ASCII to HEX

조회 수: 13 (최근 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