Matlab Challenge Who is the best

  • Context: MATLAB 
  • Thread starter Thread starter ninaricci
  • Start date Start date
  • Tags Tags
    Challenge Matlab
Click For Summary
SUMMARY

The forum discussion centers on a MATLAB programming challenge involving the generation and analysis of binary data. Key tasks include generating binary data using the randint function, defining sampling time and data rate (e.g., R=10kbps), and plotting the resulting signal x(t) for various line codes. Participants are encouraged to compute the autocorrelation function and the power spectral density using FFT techniques, with collaborative input sought to complete the solution.

PREREQUISITES
  • Familiarity with MATLAB programming and syntax
  • Understanding of digital signal processing concepts
  • Knowledge of the randint function and its applications
  • Experience with FFT and power spectral density calculations
NEXT STEPS
  • Explore MATLAB's pwelch function for power spectral density estimation
  • Learn about different line coding techniques and their pulse shapes
  • Investigate the use of Kronecker tensor products in signal processing
  • Study the implications of sampling theory in digital communications
USEFUL FOR

Mathematics students, signal processing enthusiasts, and MATLAB users seeking to enhance their programming skills and understanding of digital signal analysis.

ninaricci
Messages
18
Reaction score
0
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
 
Physics news on Phys.org
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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K