Modify the source code so we can include a random initial time delay at transmitter side and use QPSK as modulation scheme

Here is the given source code: clc; clear all; close all; fs = 48000 ;%samplingfrequency fc = 3000 ;%c a r r i e rf requency Ts= 1/fs;%samplingduration symbolrate= 1000 ;%transmittedpul s e s/secondshouldbean i n te g e rd i v i s o ro ff s symbolduration=fs/symbolrate;%numberofsamplesinone symbol pulse=hamming(symbolduration) ;%hamingpulse textin=input('Enter ASCII text for transmission:','s') ; textin; %TransformfromACSIItexttoabinarys t r i n g datainput = dec2bin(double(textin)); [number,length] = size(datainput); data=reshape(datainput,1,number*length); [number,length] =size(data); for i= 1 :length data2(i) = bin2dec(data(i)); end symbol= 2*data2-1; for i= 1 :length for j=1:symbolduration signal((i-1)*symbolduration+j) =symbol(i)*pulse(j)*cos(2*pi*fc*j*Ts); end end index= 0:Ts:(length*symbolduration-1)*Ts; [a,length2] =size(index); %%Plotf i g u r e s figure(1); plot(index,signal); axis([ 0 1.5*length*symbolduration*Ts -2 2 ]) ; xlabel('time'); ylabel('amplitude'); title('BPSK signal'); figure(2); N=length*symbolduration; ssf = (-N/ 2 :N/2 -1)/(Ts*N) ; freq = fft(signal); freq2 = fftshift(freq); plot(ssf,abs(freq2)); xlabel('frequency'); ylabel('magnitude'); title('BPSK signalspectrum');

Answers (1)

i need mathlab codes for my project indoor building solution (mobile coverage) i need the codes for design and simulation.

Asked:

on 6 Nov 2017

Answered:

on 8 Dec 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!