What the binary language which MATLAB deals with it to convert text to binary ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Abduellah Elbakoush
el 12 de Abr. de 2022
Respondida: DGM
el 12 de Abr. de 2022
I have text and I want to convert the text to binary language
Example
The text is =(Hello world)
binary language=(00010010 10100110 00110110 00110110 11110110 00000100 11101010 11110110 01001110 00110110 00100110)
0 comentarios
Respuesta aceptada
DGM
el 12 de Abr. de 2022
Start with
textchar = 'Hello world';
textbin = dec2bin(double(textchar),8)
if you want that as a logical array, then
textlogical = textbin == '1'
if you want to change the endianness
textbin = fliplr(textbin)
and so on
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Text Data Preparation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!