cdf_sim.m
来自「《移动衰落信道》Mobiel_Fading_Channels一书后面的相关仿真程」· M 代码 · 共 38 行
M
38 行
%--------------------------------------------------------------------
% cdf_sim.m ---------------------------------------------------------
%
% Program for the computation of cumulative distribution
% functions F(r).
%
%--------------------------------------------------------------------
% F_r=cdf_sim(xi_t,r,PLOT)
%--------------------------------------------------------------------
% Explanation of the input parameters:
%
% xi_t: deterministic process or time-domain signal to be analysed
% with respect to the cumulative distribution function F(r).
% r: level vector
% PLOT: plot of the resulting cumulative distribution function F(r),
% if PLOT==1
function F_r=cdf_sim(xi_t,r,PLOT)
if nargin==2,
PLOT=0;
end
F_r=zeros(size(r));
for l=1:length(r),
F_r(l)=length(find(xi_t<=r(l)));
end
F_r=F_r/length(xi_t);
if PLOT==1,
plot(r,F_r,'rx')
xlabel('r')
ylabel('F(r)')
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?