Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Finding power spectral density using MATLAB, please help

  1. Sep 15, 2012 #1
    Using Matlab, generate random unary and bi-polar sequences of period Tb=1s, over-sample each sequence by a rate of 4, calculate and display their PSD.

    It took me way too long to generate proper unary sequences. I have yet to figure out how to code bipolar sequences.

    Here is the code I came up with. I don't understand half of it and the result doesn't look correct. The problem is that the psd appears completely flat at 0 amplitude at high frequencies.

    Code (Text):
    h = commsrc.pattern('SamplingFrequency', 1, 'SamplesPerSymbol', 10, 'PulseType', 'NRZ', 'OutputLevels', [0 1], 'DataPattern', 'PRBS5');
    x = generate(h, 1000);                    

    Hpsd = dspdata.psd(x, 'SpectrumType', 'Twosided', 'CenterDC', true, 'Fs', 4);
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted