convert to text
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!