Reply by mabr...@gmail.com January 22, 20092009-01-22
Hi
Please see this code , I am confused how i added the two version of signal received from two Taps with one sample delay.Initially I have done IFFT of the signal with Four subcarriers.Please guide me.
x=transdata1;
taps=2;
p1=1;
p2=0.8;
gain1=sqrt(p1/2)*[randn(1,length(x)) + j*randn(1,length(x))];
gain2=sqrt(p2/2)*[randn(1,length(x)) + j*randn(1,length(x))];
channel_ifft=ifft([gain1,gain2],length(x));
n=1:length(x);
delay1=1;
for nay1+1:length(x) % Delay of one sample in second tap
x1(n)=x(n-delay1);
end
transdata=channel_ifft.*(x+x1); % confusing here

%------------------------Addition of noise -------------------------------
noise = 1/sqrt(2)*[randn(1,length(x)) + j*randn(1,length(x))]; % Noise
snr = [0:10]; % multiple Eb/N0 values
ps=mean(abs(x).^2); % Power of the transmitted signal
for i = 1:length(snr)
y = transdata + (sqrt(3*ps)*10^(-snr(i)/20))*noise; %Addition of Noise

%--------------------------Receiver ---
recdata=y;
rx0=recdata.*(1./(channel_ifft)); %Equilizatiom

Take care.