필터 지우기
필터 지우기

convert to text

조회 수: 2 (최근 30일)
Aseel H
Aseel H 2012년 2월 23일
A = ('Matlab Programming');
B = uint8(A);
C = dec2bin(B,8);
D = reshape(C',1,[]);
Output of D =
'010011010110000101110100011011000110000101100010001000000101000001110010011011110110011101110010011000010110110101101101011010010110111001100111'
I need to convert D to text====>>>('Matlab Programming') so split D to 8 bits====>>
E = reshape(D,[],8);
F = bin2dec(E);
G = char(F);
but G don't the correct text
output of G = F s + G è S * W

채택된 답변

Jarrod Rivituso
Jarrod Rivituso 2012년 2월 23일
I think your step creating e should be
E = reshape(D,8,[])'
The way you have it now does not properly reorder the string of 1's and 0's to the original representation of C
  댓글 수: 2
Aseel H
Aseel H 2012년 2월 23일
can not use E = reshape(D,8,[])
because it convert 8*[]
I need []*8 to convert each row to character
Aseel H
Aseel H 2012년 2월 23일
sorry, I don't see transform (')
it work correctly
thank you very much

댓글을 달려면 로그인하십시오.

추가 답변 (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