Hello Roshn!
I have read the help, but still not able to get it.
data=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1];
data=(data*(-2)+1);
%The K parameter determines how many bits are in one frame:
%num_bits_per_slot=10*2^K.
%The spreading factor SF is related to K as: SF=512/2^K.
%Select spreading factor=256 so K=1 hence there will be 20 data bits/slot
%So datarate=30kbps (k==>1 20 bits/slot*15 slot/frame=300 bits/frame and
%frame period is 10 ms.
%let's select OVSF code of length 4 for maximum data rate.
SF=4;
%Generate OVSF code.
OVSF_code=OVSFC(SF,1);
OVSF_code=OVSF_code*(-2)+1;
%plot(OVSF_code);
unsprd=[];
for i=1:15
unsprd=[unsprd data];
end
%split the data to I and Q, then Spread, conjugate the Q branch. and then
%add
I_brnch=[];
Q_brnch=[];
for i=1:2:300
I_brnch=[I_brnch, unsprd(i)];
Q_brnch=[Q_brnch, unsprd(i+1)];
end
%SF=256 ==>num_chips=20*15*256=76800chips/slot
%Spread the data;
Real=[];
Imag=[];
complex_baseband_signal_Pilot = 0;
for n=(1:length(I_brnch))
Real=[OVSF_code.*I_brnch
];
Imag=[OVSF_code.*Q_brnch
];
% complex baseband signal
complex_baseband_signal(SF*(n-1)+1:SF*n) = complex(Real,Imag);
end
%Complex Scrampbling.
[C1n_gold, SC_code]=scrambling(600, 500);
Data_scrambled=complex_baseband_signal.*SC_code;
% thermal noise generation with RMS noise_factor
thermal_noise = randn(1,length(Data_scrambled))*noise_factor + randn(1,length(Data_scrambled))*noise_factor*j;
% complex baseband signal is input into the estimated channel impulse response (hh)
channel_output = conv(Data_scrambled, hh);
% noise added to the channel_output
y = channel_output(1:length(complex_baseband_signal)) + thermal_noise;
I want to generate Delay in the signal Y
can u help me?