📄 gen_freq_h.m
字号:
function freq_H = gen_freq_H(time_h, subcarrier_num)
% this function is to generate the frequent equal H of MG*NG
% the input para time_h is a triple-dim array
size_chan = size(time_h);
m_trans = size_chan(1,1);
n_rcv = size_chan(1,2);
fir_len = size_chan(1,3);
% function channel = firChannel(m_transmitter, n_receiver, n_fir);
% to creat the fir channel
% other way, it needs to offer a fir channel save as chan;
P = [diag(ones(1,fir_len)) zeros(fir_len, subcarrier_num - fir_len)];
DFT8_array = n_point_dft_array(subcarrier_num);
F_fro = P * DFT8_array; %(L+1)*G
%size(F_fro)
G = subcarrier_num;
for index_m = 1:m_trans
for index_n= 1:n_rcv
%cur_h_nm(i,:) = squeeze(channel_fir(index_m, index_n, :))';
channel_h_mn = squeeze(time_h(index_m, index_n, :))'; % time period fir h_mn
%size(channel_h_mn)
cur_H_nm = diag(channel_h_mn * F_fro); % freq period H_mn
%size(cur_H_nm)
H((G*(index_m - 1)+1):G*index_m, (G*(index_n - 1)+1):G*(index_n)) = cur_H_nm;
end;
end;
freq_H = H;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -