From: Roy on
str='$4á%ñ& \''()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ';

I get a bunch of codes as above. They were converted from hex code to ascii and displayed on the screen.

How can I convert them back to the hex number?

Thanks.

Roy
From: Walter Roberson on
Roy wrote:
> str='$4á%ñ&
> \''()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™šÂ¢Â£Â¤Â¥Â¦Â§Â¨Â©ÂªÂ²Â³Â´ÂµÂ¶Â·Â¸Â¹ÂºÃ‚ÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ';
>
>
> I get a bunch of codes as above. They were converted from hex code to
> ascii and displayed on the screen.
>
> How can I convert them back to the hex number?

num2str(str .', '%x')

Some of the values are going to require four hex digits -- e.g., your
… is not a single-byte character.