MATLAB: How to extract the LSB from the binary numbers (ASCII to Binary) of each character read from a file

MATLABmatrixsteganography

I want to read a text file in MATLAB. Then i want to convert its characters into their equivalent binary number. (ASCII to binary). The next thing i want to do is, i want to extract the LSB of each binary number and store all the LSB in a new array.

Best Answer

Last = @(M) M(:,end)
LSB = Last( dec2bin( fileread('NameOfYourfile') ) );