1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding power spectral density using MATLAB, please help

  1. Sep 15, 2012 #1
    Question:
    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);                    
    plot(x)

    Hpsd = dspdata.psd(x, 'SpectrumType', 'Twosided', 'CenterDC', true, 'Fs', 4);
    plot(Hpsd)
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?



Similar Discussions: Finding power spectral density using MATLAB, please help
  1. Matlab help (Replies: 0)

  2. Help with Matlab (Replies: 0)

Loading...