lcr_nakagami.m
来自「无线移动信道的matlab源码 用于对无线通信信道的编程实现」· M 代码 · 共 48 行
M
48 行
%--------------------------------------------------------------------% lcr_sim.m ---------------------------------------------------------%% Program for the computation of the level-crossing rate N(r).%%--------------------------------------------------------------------% N_r=lcr_sim(xi_t,r,T_sim,PLOT)%--------------------------------------------------------------------% Explanation of the input parameters:%% xi_t: deterministic process or time-domain signal to be analysed % with respect to the level-crossing rate N(r)% r: level vector% T_sim: duration of the simulation% PLOT: plot of the resulting level-crossing rate N(r), if PLOT==1function N_r=lcr_Nakagami(sigma_1_2,sigma_2_2,r,thita,BEITA1,BEITA2,PLOT)global BEITA1 BEITA2if nargin==3, PLOT=0;endN_r=zeros(1,length(r));for i=1:length(r)a1=sigma_2_2*(cos(thita).*cos(thita));a2=sigma_1_2*(sin(thita).*sin(thita));c=a1+a2;b=sqrt(sigma_1_2*sigma_2_2);d=(2*pi)^(3/2);b1=r(i)/(d*b);b2=-(r(i).*r(i))/(2*sigma_1_2*sigma_2_2);b3=exp(b2.*c);a3=BEITA1*(cos(thita).*cos(thita));a4=BEITA2*(sin(thita).*sin(thita));c2=sqrt(a3+a4);d1=b3.*c2;% d1=curv(b3,thita,BEI1,BEITA2);e=quad('curv',0,2*pi);N_r(i)=b1.*e;endif PLOT==1, plot(r,N_r) xlabel('r') ylabel('N(r)')end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?