dalysk
Newbie level 5
Hello every body!
I got the program below from the book mobile fading channels by Matthias Pätzold. It is wirtten to plot the probability density function of any process. The problem is how to use this function. It is clear that the xi_t is the process we want to plot it's probability density function. Especially my problem is what is the signification of the parameter z and how to fix it? Many thanks for all.
% pdf_sim.m ---------------------------------------------------------
%
% Program for the computation of probability density functions p(z).
%
%--------------------------------------------------------------------
% p_z=pdf_sim(xi_t,z,PLOT)
%--------------------------------------------------------------------
% Explanation of the input parameters:
%
% xi_t: deterministic process or time-domain signal to be analysed
% with respect to the probability density function p(z).
% z: equidistant level vector
% PLOT: plot of the resulting probability density function p(z),
% if PLOT==1
function p_z=pdf_sim(xi_t,z,PLOT)
if nargin==2,
PLOT=0;
end
p_z=hist(xi_t,z)/length(xi_t)/abs(z(2)-z(1));
if PLOT==1,
plot(z,p_z,'mx')
xlabel('z')
ylabel('p(z)')
end
I got the program below from the book mobile fading channels by Matthias Pätzold. It is wirtten to plot the probability density function of any process. The problem is how to use this function. It is clear that the xi_t is the process we want to plot it's probability density function. Especially my problem is what is the signification of the parameter z and how to fix it? Many thanks for all.
% pdf_sim.m ---------------------------------------------------------
%
% Program for the computation of probability density functions p(z).
%
%--------------------------------------------------------------------
% p_z=pdf_sim(xi_t,z,PLOT)
%--------------------------------------------------------------------
% Explanation of the input parameters:
%
% xi_t: deterministic process or time-domain signal to be analysed
% with respect to the probability density function p(z).
% z: equidistant level vector
% PLOT: plot of the resulting probability density function p(z),
% if PLOT==1
function p_z=pdf_sim(xi_t,z,PLOT)
if nargin==2,
PLOT=0;
end
p_z=hist(xi_t,z)/length(xi_t)/abs(z(2)-z(1));
if PLOT==1,
plot(z,p_z,'mx')
xlabel('z')
ylabel('p(z)')
end