Mai A.

asked • 01/04/21

how can I simulate poisson random process ?

I simulate a single realization of the Poisson counting process as described above. Such that the discrete-amplitude random process counts the number of packets arriving in the time interval [0,t). Take your simulation total time to be 10 hours, time sampling step size to be 1 sec.


Assume that the average number of packets arriving per minute in a certain cell is 10


lambda = 1/6;

nPeriods = 36000;

dt = 1; %time steps

T = nPeriods*dt;

t = 0:1:T;

rng('default')

k=randi([1,10],1,nPeriods);

f = (lambda.^k).*exp(-lambda)./factorial(k); % Poission Dist.

Nd = cumsum(f);

N = [ 0 Nd(1:end) ]; % N(0)=0.

stairs(t,N)

hist(Nd)


I write this code but am I right ?

1 Expert Answer

By:

Patrick B. answered • 01/04/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Mai A.

how can I compute the interval times between the arrival of each two successive packets
Report

01/05/21

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.