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

 Respuesta aceptada

Walter Roberson
Walter Roberson el 31 de En. de 2014

0 votos

h = uicontrol('Style', 'edit', 'String', 'pass1234');
and later
pass = get(h, 'String');
hexpass = sprintf('%02X', pass+0);

1 comentario

Bakka
Bakka el 31 de En. de 2014
thanks Mr. Walter, finally I got how to convert it.
str='pass1234';
a=sprintf('%X', str);
display(a);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 31 de En. de 2014

Comentada:

el 31 de En. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by