Cross Correlation of tranmit and recieve signal

3 views (last 30 days)
I am generating the ofdm modulated random transmit signal. And used usrp to recive the signal. Now I am correlating the two signals.
As the transmit signal is of the size (1*88 double), and the recived signal is of size(101888*1 double)
so I want to correlate transmit signal wiht each chunk of the recive signal with step size of transmit signal 88.
But when I correlate, I see only one peak which is strange. So i want if there is something wrong woth the code.
please see the below following code I used and suggest me the changes to be made
%Write time domain signal to binary file
file=fopen('H:\MatlabFiles\Transmit Signals\ransig\ran_trans.dat','w');
fwrite(file,x_psd);
fclose(file);
%Read binary file to time domain signal
Fsave=fopen('H:\MatlabFiles\Transmit Signals\ransig\ranrecv.dat','rb');
Data=fread(Fsave);
fclose(Fsave);
%cross corelation of signals
j=length(x_psd);
if ismatrix(Data)
[r,c]=size(Data);
for i=1:88:r %change the stepsize for the pulse generation
c=xcorr2(j,i);
figure(7),
plot(c);
end
end

Answers (0)

Community Treasure Hunt

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

Start Hunting!