Generating a Binary Signal
Mostrar comentarios más antiguos
How do I generate a binary signal and export the file as a audio file (.wav,.mp3,etc)?
EDIT:
I want to generate a pulse that has high and lows. I would also like to be able to control the relative proximities of the highs and lows and store this pulse as a .wav file. So when I play this pulse and analyze it with an oscilloscope I expect to see something like this http://upload.wikimedia.org/wikipedia/commons/5/55/NRZcode.png with the troughs at 0 volts
3 comentarios
Jan
el 21 de Jul. de 2012
This question is too general to be answered efficiently. What exactly do you want and can you imagine any method to create a non-binary signal on a computer?
Walter Roberson
el 21 de Jul. de 2012
Jahangir
el 21 de Jul. de 2012
Respuestas (1)
Walter Roberson
el 15 de Ag. de 2012
0 votos
You cannot control the relative proximity of the highs and lows in a .wav file, as .wav files are fixed frequency.
If fixed frequency is acceptable, then just generate your data as a column vector and use wavwrite() on it.
Categorías
Más información sobre Audio I/O and Waveform Generation 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!