MATLAB Answers

0

string convert to binary 8

Asked by LEKHCHINE Somia on 24 Aug 2019
Latest activity Commented on by LEKHCHINE Somia on 25 Aug 2019
how convert string (more than one character, two, three......) to 8 binary

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 25 Aug 2019

bit_vector = reshape((dec2bin(uint8(TheCharacterVector), 8) - '0').', 1, []);

  1 Comment

sorry may be my question was not clear
my object is to convert 'something like password or any thing ex:(hello)' to '8 bits ex:(10101010)'
so I want to insert it like watermark in my frame because I use dct algorithm

Sign in to comment.