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)

    b=randint(1,100);
    R=10000; %data rate: 10kbps
    Tb=1/R; %bit duration
    Nb=length(b);
    Ts=Tb/4000;
    Fs=1/Ts;
    Ns=100; %40 samples/bit
    d=b;
    pulse=ones(1,Ns);
    t=0:Ts:((Ns*Nb)*Ts)-Ts;

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

    end



    solution 2:
    >>b = rand(100,1);
    >>R=10000;
    >>Tb=1/R;
    >>Ts=Tb/40;
    >>Nb=length(b);
    >>Ns=40;
    >>pulse =[ones(1,Ns/2), -ones(1,Ns/2)];
    >>t=0:Ts:((Ns*Nb).*Ts)-Ts;
    >>f=0:0.05*Rb:2*Rb;
    >>x=f*Tb;
    >>d=b;
    >>x=kron(d,pulse);




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

    Integral

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Matlab Challenge Who is the best
Loading...