I have an array which at the end of my loop will contain a sequence of 1's and 0's which will contain a hidden message when decoded. I need to find away to convert this array into it's equivalent ascii characters for each segment of 8 bits. I generate this array of 1's and 0's by generating a logical array which I then convert to an integer array (probably unecessary if there is a more direct way). I then tried using dec2bin but I don't know what that does for me. So for example my integer array looks like:
Decode=[01000001] (type int8)
dec2bin – creates a column array of Decode in type char (this needs to be a row vector though).
So in this example the first 8-bits pertain to the decimal value 65 which is ASCII 'A'. At the end of my loop 'Decode' will be a long vector array containing many 8 bit sequences where each 8-bits corresponds to a particular ASCII character which will create a message at the end.
I can not figure out how to get Decode to ASCII.
Best Answer