📄 form_matrix.m
字号:
function channel_est=form_matrix(SimulationParameters)
global SimulationConstants;
N=SimulationParameters.N;
M=SimulationParameters.M;
if M==1 & N==2
load cir11;
load cir12;
CIR11=fft(cir11,SimulationParameters.FFTPoints,2);
CIR12=fft(cir12,SimulationParameters.FFTPoints,2);
channel_est=[CIR11.' CIR12.'];
elseif M==2 & N==4
load cir_24;
CIR11=fft(cir11,SimulationParameters.FFTPoints,2);
CIR12=fft(cir12,SimulationParameters.FFTPoints,2);
CIR13=fft(cir13,SimulationParameters.FFTPoints,2);
CIR14=fft(cir14,SimulationParameters.FFTPoints,2);
CIR21=fft(cir21,SimulationParameters.FFTPoints,2);
CIR22=fft(cir22,SimulationParameters.FFTPoints,2);
CIR23=fft(cir23,SimulationParameters.FFTPoints,2);
CIR24=fft(cir24,SimulationParameters.FFTPoints,2);
channel_est=[CIR11.' CIR12.' CIR13.' CIR14.' CIR21.' CIR22.' CIR23.' CIR24.'];
elseif M==2 & N==2
load cir_22;
CIR11=fft(cir11,SimulationParameters.FFTPoints,2);
CIR12=fft(cir12,SimulationParameters.FFTPoints,2);
CIR21=fft(cir21,SimulationParameters.FFTPoints,2);
CIR22=fft(cir22,SimulationParameters.FFTPoints,2);
channel_est=[CIR11.' CIR12.' CIR21.' CIR22.'];
elseif M==2 & N==3
load cir_23;
CIR11=fft(cir11,SimulationParameters.FFTPoints,2);
CIR12=fft(cir12,SimulationParameters.FFTPoints,2);
CIR13=fft(cir13,SimulationParameters.FFTPoints,2);
CIR21=fft(cir21,SimulationParameters.FFTPoints,2);
CIR22=fft(cir22,SimulationParameters.FFTPoints,2);
CIR23=fft(cir23,SimulationParameters.FFTPoints,2);
channel_est=[CIR11.' CIR12.' CIR13.' CIR21.' CIR22.' CIR23.'];
end
fft_length=SimulationParameters.FFTPoints;
%if there is a zeropad option
if SimulationParameters.ZeroPad==1
num_data_carriers=sum(SimulationConstants.NumDataSubc);
x=fft_length-num_data_carriers;
channel_est=channel_est([x/2:x/2+num_data_carriers/2-1 ((x/2+num_data_carriers/2)+1):fft_length-(fft_length-num_data_carriers)/2],:);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -