www.pudn.com > mimoprecoding.rar > corelation_H.m, change:2006-07-13,size:907b


function corelation = corelation_H(cir,sim_options) 
%global sim_consts; 
[n_tx_antennas, n_rx_antennas] = get_n_antennas(sim_options); 
cir = transpose(cir); 
[temp_r,temp_c] = size(cir); 
cir_f = zeros(1024,temp_c); 
for i = 1 : temp_c 
    cir_f(:,i) = fft(cir(:,i),1024); 
end 
cir_tx = zeros(2*64,temp_c/2); 
pattern = [1:2:2*1024;2:2:2*1024]; 
for i = 1 : temp_c/2 
    cir_tx(pattern(1,:), i) = cir_f(:,i); 
    cir_tx(pattern(2,:), i) = cir_f(:,i + temp_c/2); 
end 
for i = 1 : 1024 
    for j = 1 : n_rx_antennas 
        cir_tx_subc(j,:,i) = cir_tx(j+(i-1)*n_rx_antennas,:); 
    end 
end 
cir_H = []; 
for k = 1: 1024 
    cir_H = [cir_H reshape(cir_tx_subc(:,:,k),1,8).']; 
end 
corelation = []; 
for l = 1 : 1024 
    corelation = [corelation abs(cir_H(:,l)'*cir_H(:,512))/sqrt((abs(cir_H(:,l)'*cir_H(:,l))*abs(cir_H(:,512)'*cir_H(:,512))))]; 
end

2018无需申请注册送58体验金