Which is better?converting hexadecimal to string directly or first converting hexa to decimal and then from decimal to string?

1 次查看(过去 30 天)
i have a variable containing hex value..eg:con=63727970746F,now it should be converted to string..How do i do that? Please note that i directly can't take hex value in my code since it gets generated dynamically.. i have to use the variable only!!Please help me.
THANK You

采纳的回答

Walter Roberson
Walter Roberson 2015-9-30
char(sscanf(con, '%2x'))
provided that con is an even length.
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by