Charecter to binary form
Mostrar comentarios más antiguos
I have a character A. I converted this into a binary form(say B). I need to perform some operations using B. While doing this I need to check whether the element B(1)=1 or 0.
For doing so, I write
if B(1)==1
But it doesn't work. It works when I written like this-
if B(1)=='1'
What is the reason? Please tell me...
2 comentarios
Jurgen
el 30 de En. de 2013
Apparently B is still a character array. Would help if you said how you converted it. Type whos B to see the type.
Jan
el 30 de En. de 2013
I do not understand, what the "binary form" of a character is. Please post the corresponding Matlab code to clear the details.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!