MATLAB: How to convert binary stream of length 1*524288 to decimal string of length 1*65536

binary to decimal

There is a need to group 8 bits in the binary stream of 1*524288 to make a decimal string..how to do this using matlab?

Best Answer

bin2dec probably does most of what you want:
>> bin2dec(reshape('0000000100000010',8,[]).')
ans =
1
2