MATLAB: Convert bin to text

arraybinaryfunctionmatrixtext file

I want convert binary to text for example:
A = ('abcdefghigklmnopqrstuvwxyz');
int = uint8(A);
bin = dec2bin(int);
message = char(bin);
but when execute this code the result is binary value to each character, but I want the result is the same text that converted(abcdefghigklmnopqrstuvwxyz)

Best Answer

message = char(bin2dec(bin));
Note: this might get you a column vector of characters. dec2bin() does not preserve the shape of the original vector anywhere, so you need to reshape() after conversion back.
Related Question