What the binary language which MATLAB deals with it to convert text to binary ?
4 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
DGM
on 12 Apr 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 Comments
More Answers (0)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!