Converting from Binary to Text

12 次查看(过去 30 天)
I receive a binary bit stream, of 7 ascii bits per letter, into an array. I convert it to char by doing the following:
out=char(bin2dec(num2str(reshape(rx_bit_stream,7,[])).'));
However, the output is in the format:
T
e
s
t
How can I make it:
Test
  1 个评论
Walter Roberson
Walter Roberson 2012-11-27
Note: Instead of using num2str(expression) you can use char('0' + expression)

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2012-11-27
Looks like a column vector and you want a row vector, so how about
out = out'; % Transpose.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by