genh.m

来自「Simulation of Wimax network」· M 代码 · 共 36 行

M
36
字号
function fadingcoeff=genh(I,v,Dop,tb)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                        %
%%     Name: genh.m                                                       %
%%                                                                        %
%%     Description: We generate a unique coefficient of fading with "sum  %
%%      of sinusoides" of the Jakes model.                                %
%%                                                                        %
%%     Parameters:                                                        %
%%          I = Length of the plot                                        %
%%          v = Speed of the terminal (m/s)                               %
%%          Dop = Maximum frequency of the Doppler effect                 %
%%          tb = Symbol Duration                                          %
%%                                                                        %
%%     Authors: Bertrand Muquet, Sebastien Simoens, Shengli Zhou          %
%%      October 2000                                                      %
%%                                                                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  fc = 2.3e9; 			% Carrier Frequency in Hertz (2.5GHz 3.2GHz)
  fdmax = Dop;        
  
  N = 100;                      % Number of incident waves
  t = tb:tb:tb*I;               % The variable "time"

  len = length(t);
  theta = rand(1,N)*2*pi;              % Generating the uniform phases
  fd = cos(2*pi*((1:N)/N))*fdmax;      % Generate eqaul-spaced frequencies from  "-fdmax" to "+fdmax"
  
 
  E = exp(j.*(2*pi*fd(:)*t(:)'+repmat(theta(:),1,len)));
  E = E/sqrt(N);
  fadingcoeff = sum(E);
  %plot(t,abs(fadingcoeff))
  %xlabel('time (second)');ylabel('Envelope of the fading coefficient');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?