dividing of binary numbers
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 22 Mai 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
am 22 Mai 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
am 23 Mai 2023
Walter Roberson
am 23 Mai 2023
What do you want to have happen if the character vector is not an exact multiple of 4 long?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Computer Vision with Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!