creating a analog signal to convey binary logic (binary signal)

Asked by Jahangir on 21 Jul 2012
Latest activity Answered by Star Strider on 22 Jul 2012

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 volt.

0 Comments

Jahangir

Products

No products are associated with this question.

2 Answers

Answer by Image Analyst on 21 Jul 2012

I think you need the Instrument Control Toolbox:

"Control and communicate with test and measurement instruments

Instrument Control Toolbox™ lets you connect MATLAB® directly to instruments such as oscilloscopes, function generators, signal analyzers, power supplies, and analytical instruments. The toolbox connects to your instruments via .............."

0 Comments

Image Analyst
Answer by Star Strider on 22 Jul 2012
Edited by Star Strider on 22 Jul 2012

You can probably do that from MATLAB using your computer soundcard output. See http://www.mathworks.com/help/techdoc/ref/audioplayer.html and http://www.mathworks.com/help/techdoc/ref/audiodevinfo.html for relevant details.

I suggest you write your square wave pulse train something like this:

    x = [0  0  0  0  1  1  0  1  1  0  0  0  1  0  0];
    xm = repmat(x,100,1); 
    xv = xm(:);

It will not look like the image in the link you provided. Most soundcards have maximum frequency passbands of 20 Hz to 20000 Hz, so you will get transients, ringing, and rolloff at the transitions.

0 Comments

Star Strider

Contact us