I am trying to convert an ASCII test string to a binary bit stream for output to an external device down the line. As a test, I create a text string:
ascii_msg='Test.';
As expected, a 5×7 char array is created. I'm not sure where to go from here. I use:
bin_msg=cellstr(dec2bin(ascii_msg));
And end up with a 12×1 cell array. I would like to get this in a 35×1 cell array, with each cell containing 1 bit. What is the best way to go about this?
Best Answer