convert to text

4 views (last 30 days)
A = ('Matlab Programming');
B = uint8(A);
C = dec2bin(B,8);
D = reshape(C',1,[]);
Output of D =
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

Accepted Answer

Jarrod Rivituso
Jarrod Rivituso on 23 Feb 2012
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
Aseel H
Aseel H on 23 Feb 2012
sorry, I don't see transform (')
it work correctly
thank you very much

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!