Filter löschen
Filter löschen

Converting from Binary to Text

9 Ansichten (letzte 30 Tage)
Jared
Jared am 27 Nov. 2012
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 Kommentar
Walter Roberson
Walter Roberson am 27 Nov. 2012
Note: Instead of using num2str(expression) you can use char('0' + expression)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by