generating 2 bits sequence of binary data
Mostrar comentarios más antiguos
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 comentarios
James Tursa
el 20 de Feb. de 2019
Do you want the output to be a character array?
Ayesha Punjabi
el 27 de Feb. de 2019
Walter Roberson
el 27 de Feb. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical 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!