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

Matlab Challenge Who is the best

  1. Oct 17, 2006 #1
    Dear all Math students :
    here is a challenging program needed to be run using matlab
    well i am presenting part of the solution and looking for the support from all of to reach the rest of the result >>>>>>cooperation is being seeked:

    generate binary data b_k using randint.
    2. define the sampling time, and the data rate. For example, data rate can be R=10kbps, T=1/R, and sampling time Ts=T/40;
    3. according to the above define your pulse shape (wave form of the different line codes).
    4. obtain the x(t)=\sum_{k=-100}^{100} d_k p(t-kT)
    d_k should be correctly mapped from the b_ks generated above.
    5. plot the resulting x(t) for the different line codes.
    6. obtain the autocorrelation function of x(t) (you may need to average over many realization (10-50 realizations should be enough to get smooth curve).
    7. obtain the power spectral density by performing FFT of the autocorrelation function.
    8. plot the power spectral density.

    solution 1:
    function f1=unipolar_nrz(b,R,Ns)

    R=10000; %data rate: 10kbps
    Tb=1/R; %bit duration
    Ns=100; %40 samples/bit

    x=kron(d,pulse); %Kronecker tensor product
    %y1 = wgn(100,1,0);
    %y= X+ 0.00001*y1;
    D= pwelch(x,33,32,[],Fs,'twosided');


    solution 2:
    >>b = rand(100,1);
    >>pulse =[ones(1,Ns/2), -ones(1,Ns/2)];

    hurry up.....who is the best matlab program user who can come with a solution
  2. jcsd
  3. Oct 17, 2006 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Unfortunately it is against the policy of this site to DO YOUR homework. We will hint and help but you have to do your own work.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook