# About plotting probability density function

Status
Not open for further replies.

#### 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

#### SunnySkyguy In time domain, PD applies to serial data that resembles a sync word as shifted in time where correlation or number of correct bits agrees to pattern in a gaussian shape toward s and after sync so there is some prediction weighting incase of bit errors. You can measure the pattern matching by sum of bits that match sync code pattern.

In frequency domain like spectrum Analyzers, they scan the signal for spectral density with a given narrow bandwidth and time response to determine signal density for each unit bandwidth.

I believe ( but I am not certain) this is the p(z) parameter, which can be in time or frequency domain, where width is in clock period in time domain and 2nd IF BW in a spectrum Analyzer. for DSP, it would be the effective spectral bandwidth of your FFT.

I think... it seems ok. Is everything initialized?

Is the unicode correct for ' vs ''

Last edited:

Status
Not open for further replies.