Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
hi,I wanted to know, how can i generate a 3 bit sequential binary vector with up to only ONE 1?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Eg: 001, 010,100
0 comentarios
Respuestas (1)
John D'Errico
el 17 de Ag. de 2017
Editada: John D'Errico
el 17 de Ag. de 2017
Up to only ONE 1 means the number is any number (in decimal) from the set [0,1,2,4].
Pick an element at random from that set. Then convert to binary.
help dec2bin
1 comentario
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!