A simple string to Hexadecimal value
    42 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    sai charan bandi
 le 18 Juin 2015
  
    
    
    
    
    Commenté : sai charan bandi
 le 18 Juin 2015
            Hi everyone I am struggling with a simple problem. I want to convert simple string 'hello' to its hexvalue (68656c6c6f). I can use dec2hex converter, but I am getting a matrix
>> dec2hex('hello')
ans =
68
65
6C
6C
6F
I tried using mat2str command which produces ['68';'65';'6C';'6C';'6F']
but I want to finally produce a simple string '68656c6c6f', when I give input as 'hello' string.
Is it possible to do that in matlab??
0 commentaires
Réponse acceptée
  Azzi Abdelmalek
      
      
 le 18 Juin 2015
        
      Modifié(e) : Azzi Abdelmalek
      
      
 le 18 Juin 2015
  
      a=dec2hex('hello');
out=reshape(a,1,[])
2 commentaires
Voir également
Catégories
				En savoir plus sur ActiveX dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


