필터 지우기
필터 지우기

Converting from Binary to Text

조회 수: 9 (최근 30일)
Jared
Jared 2012년 11월 27일
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