generating 2 bits sequence of binary data
Afficher commentaires plus anciens
tag_arr = randi(0:1,1,5);
is giving random 0 and 1
tag_arr = randi(0:1,1,5)
tag_arr =
0 0 0 1 1
I am trying to gain 2 bits data
that means tag_arr should be randomly show in the following manner
tag_arr =
00 10 01 10 01 10
i tried several ways of using randi syntax but its not working kindly help
3 commentaires
James Tursa
le 20 Fév 2019
Do you want the output to be a character array?
Ayesha Punjabi
le 27 Fév 2019
Walter Roberson
le 27 Fév 2019
"binary characters" do not exist in MATLAB. Signed and unsigned integers exist in MATLAB; single precision and double precision floating point value exist in MATLAB; characters exist in MATLAB; logical values (that are mostly treated as being 0 and 1 for numeric purposes) exist in MATLAB. General binary does not exist in MATLAB. The closest MATLAB gets is the fixed-point datatype.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!