Binary Number Transmitter
Mostrar comentarios más antiguos
I need to create a transmitter that generates 100000 binary bits encoded as +/-3 volts using rand() but it doesn't seem to recognize the if just goes to the else. I know its something dumb any help would be appreciated I have:
x = rand(1,100000)
bit=(x>.5)
if bit==0
bit = bit-3
else x == 1
bit = bit+3
end
Respuesta aceptada
Más respuestas (1)
Will
el 15 de Nov. de 2011
0 votos
2 comentarios
Sven
el 15 de Nov. de 2011
I'm not quite sure what you mean here, Will.
Your best bet will be to accept an answer to this question and write a new question about bit error rates. I'm afraid the short sentence above is a little unclear to me. Your original question here was well written: clearly written, well described, and you showed the code you were running. If you can do that again with this next question I'm sure you'll get an answer quickly.
Walter Roberson
el 15 de Nov. de 2011
The bit error rate with this system is 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!