gain.m
来自「JAKES 模型的具体实现,应用瑞利衰落信道的特性」· M 代码 · 共 26 行
M
26 行
function[raleigh]=Gain(Fd,N)
%% Producing a raleigh distribution with given Doppler frequency Fd;
%% N>10000,small N will distroy the gaussion of WGN;
Fs=256000; %% channel sample rate;
sgma=1;
tmax=40/(2*pi*Fd); %% 20dB time point;
r=ceil(64/(2*tmax)); %% symbol rate of the gaussian data;
rn=ceil(r*N/Fs); %% the numble of gaussion noise;
L=Fs/r; % interpolation factor;
gnr=WGN(1,rn,0); % white gaussion noise;
gni=WGN(1,rn,0); % white gaussion noise;
gn=gnr+j*gni;
Jakes=Jfilter(Fd); % Jakes' filter with Doppler frequency Fd;
J=conv(gn,Jakes); % Doppler filter;
J=abs(J);
J1=J(33:(rn+32)); % deleting the head and the tail;
JN=sqrt(var(J1));
J1=J1/JN;
m=1:rn; %% interpolation with factor L;
n=1:1/L:rn;
raleigh=spline(m,J1,n); %% raleigh data with Fd and channel sample rate;
size(raleigh)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?