Converting from Binary to Text

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 comentario

Walter Roberson
Walter Roberson el 27 de Nov. de 2012
Note: Instead of using num2str(expression) you can use char('0' + expression)

Iniciar sesión para comentar.

 Respuesta aceptada

Image Analyst
Image Analyst el 27 de Nov. de 2012

0 votos

Looks like a column vector and you want a row vector, so how about
out = out'; % Transpose.

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 27 de Nov. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by