multi_path channel.m
来自「OFDM系统的仿真代码MATLAB环境下」· M 代码 · 共 28 行
M
28 行
% Two_path Rayleigh Channel
function [b1, b2] = maltipath_channel
global sim_consts;
N = 1000;
% The IIR filter is described by the vectors A and B
A = [1 -2*p p^2];
B = (1-p)^2;
if ~isempty(findstr(sim_consts.ChannelMode, 'Slow-variable')) % Slow-variable channel
p = 0.99;
for i = 1:N
[white_noise_seq1(i), white_noise_seq2(i)] = gngauss;
end;
b1=filter(B,A,white_noise_seq1);
b2=filter(B,A,white_noise_seq2);
elseif ~isempty(findstr(sim_consts.ChannelMode, 'Fast-variable')) % Fast-variable channel
p = 0.9;
for i = 1:N
[white_noise_seq1(i),white_noise_seq2(i)] = gngauss;
end;
b1 = filter(B,A,white_noise_seq1);
b2 = filter(B,A,white_noise_seq2);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?