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.)
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
Translated by
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.