MATLAB: How to convert a string to a 8 bit Ascii one row binary vector binary Hello everyone. I have for example the string:"abcd" i want to convert it to "01100001011000100110001101100100" (see the apendded zeros). as a logical vector. thanks! Best Answer s='abcd'p=dec2bin(double('abcd'),8)'out=p(:)' Related SolutionsMATLAB: Covert 128 binary string into hex decimal b = your binary digits vectord = [8 4 2 1]*reshape(b,4,[]);h = sprintf('%x',d); MATLAB: How to convert a string to binary and then from the binary back to string binary = reshape(dec2bin(s, 8).'-'0',1,[])str = char(bin2dec(reshape(char(binary+'0'), 8,[]).')) Related QuestionMatrix of bits into ASCII stringGet character value from decimalI want to convert string to binary equivalent and binary to stringConvert bin to textBinary String to ASCIIHow to xor a and b now
Best Answer