Want to get only characters after using bin2dec.
Show older comments
I'm first trying to change characters to binary using dec2bin. Have reshaped it to form a single row array and performed some actions which resulted in the shuffling of bits. Then I'm getting a data set in binary which after reshaping and using char(bin2dec) gives character array.
Problem : The obtained array consists of many blank spaces, which when copied to word sometimes shows special symbols. Is it possible to get a resultant array of only characters?
2 Comments
Muhammad Usman Saleem
on 13 Apr 2016
share some code or error plz
Accepted Answer
More Answers (1)
James Tursa
on 13 Apr 2016
1 vote
If you are shuffling the bits around, then you are likely getting resulting characters that are in the "non-printable" set ... i.e. those "special symbols" and other characters that don't even print. These are characters, they just aren't the usual text characters you see printed to the screen. They are a direct result of the algorithm you used to mix up the bits. So, no you can't get rid of them if you continue to use that algorithm. If you want normal text characters mapping into other normal text characters then you will need to use a different algorithm.
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!