First,str2num converts a number represented as a string into a double-precision number, so:
q = str2num('A')
returns:
q =
[]
which is probably not what you want.
This line:
r = uint8('AaBbQqZz')
produces:
r =
65 97 66 98 81 113 90 122
that probablyis what you want.
Second, the‘binary_rem’ function takes the (badly-named)‘input’ variable and concatenates a vector of zeros to the end of it. I have no idea what its purpose is in the script that calls it. (Note thatinput is a built-inMATLAB function. It is not a good idea to name a variable the same as a function, but here you can get away with it because it is local to the‘binary_rem’ function only.)
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.