uwb_sv_freq_depend_ct_15_4a.m
来自「IEEE802.15.4a信道模型-matlab实现,超宽带研究者的必备代码~」· M 代码 · 共 30 行
M
30 行
function [h]= uwb_sv_freq_depend_ct_15_4a(h,fc,fs,num_channels,kappa)
% This function is used to remove the frequency dependency of the
% antenna(cm_num= 3,4 ,5,6) or to include the channel frequency dependency.
h_len = length(h(:,1));
f = [1-fs/fc/2 : fs/fc/h_len/2 : 1+fs/fc/2].^(-2*(kappa));
f = [f(h_len : 2*h_len), f(1 : h_len-1)]';
i = (-1)^(1/2); % complex i
for c = 1:num_channels
% add the frequency dependency
h2 = zeros(2*h_len, 1);
h2(1 : h_len) = h(:,c); % zero padding
fh2 = fft(h2);
fh2 = fh2 .* f;
h2 = ifft(fh2);
h(:,c) = h2(1:h_len);
% change to complex baseband channel
phi = rand(h_len, 1).*(2*pi);
h(:,c) = h(:,c) .* exp(phi .* i);
% Normalize the channel energy to 1
h(:,c) = h(:,c)/sqrt(h(:,c)' * h(:,c) );
end
return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?