dividing of binary numbers
Mostrar comentarios más antiguos
See i have a binary code of unknown length , i want to divide it into blocks of length four and assign each block to a variable .
4 comentarios
Walter Roberson
el 22 de Mayo de 2023
How is your "binary code of unknown length" stored?
Is it stored like
'0001101000111'
is it stored like
[0 0 0 1 1 0 1 0 0 0 1 1 1]
is it stored like
[false false false true true false true faslse false false true true true]
is it encoded into a single uint64 number (and so has a maximum length of 64) ?
Walter Roberson
el 22 de Mayo de 2023
and assign each block to a variable
Please read http://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval for information about why we strongly recommend against creating variable names dynamically.
Ganesh
el 23 de Mayo de 2023
Walter Roberson
el 23 de Mayo de 2023
What do you want to have happen if the character vector is not an exact multiple of 4 long?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Signal Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!