📄 gain.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -