MATLAB: How to convert char into string

char to string conversion

I have "d879c14e5b1fa7a413aa46bbbc2b8710" this in char form and I want to convert this into string. As i want to split 2-2 character into binary so i want to split it into string.

Best Answer

>> str = 'd879c14e5b1fa7a413aa46bbbc2b8710';
>> dec2bin(sscanf(str,'%2x'))
ans =
11011000
01111001
11000001
01001110
01011011
00011111
10100111
10100100
00010011
10101010
01000110
10111011
10111100
00101011
10000111
00010000