mu_i_t.m

来自「《移动衰落信道》Mobiel_Fading_Channels一书后面的相关仿真程」· M 代码 · 共 38 行

M
38
字号
%--------------------------------------------------------------------
% Mu_i_t.m ----------------------------------------------------------
%
% Program for the simulation of real deterministic Gaussian processes
% mu_i(t) [see Fig. 4.2(b)].
%--------------------------------------------------------------------
% mu_i_t=Mu_i_t(c,f,th,T_s,T_sim,PLOT)
%--------------------------------------------------------------------
% Explanation of the input parameters:
%
% f:  discrete Doppler frequencies
% c:  Doppler coefficients
% th: Doppler phases
% T_s: sampling interval
% T_sim: duration of the simulation
% PLOT: plot of the deterministic Gaussian process mu_i(t),  
%       if PLOT==1 

function mu_i_t=Mu_i_t(c,f,th,T_s,T_sim,PLOT)

if nargin==5,
   PLOT=0;
end

N=ceil(T_sim/T_s);
t=(0:N-1)*T_s;
mu_i_t=0;
for k=1:length(f),
    mu_i_t=mu_i_t+c(k)*cos(2*pi*f(k)*t+th(k));
end

if PLOT==1,
   plot(t,mu_i_t)
   xlabel('t (s)')
   ylabel('mu_i(t)')
end

⌨️ 快捷键说明

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