Poisson Process for 500 variates
Mostra commenti meno recenti
I would like to generate a code to produce a poisson process for N = 500 variates witk k is randomly between 1 and 10 and lambda = 12.
N = 500;
T = 1;
lambda = 12;
t = linspace(0, T, 100);
dt = t(2) - t(1);
S=cumsum([zeros(1,N); poissrnd(lambda*dt, length(t)-1, N) ]);
plot(t,S)
I generated this code by myself, bu I cannot use the random value of k between 1 and 10 , and 500-variates graph has too many lines, but I guess this result is totally wrong, how can I get rid of my mistakes and write the code properly?
Thanks a lot.
My second code is this
T = 1;
lambda = 12;
k=9;
t = linspace(0, T, 500);
for i = 1:500
f(i) = (lambda.^k) .* exp(-lambda) ./ factorial(k);
end
N = cumsum(f);
disp(N)
stairs(t,N(1:100))
But, again, the graph and estimations are totally wrong.
Risposta accettata
Più risposte (3)
Sulaymon Eshkabilov
il 14 Mag 2020
Here is the alternative solution:
T = 1;
lambda = 12;
t = linspace(0, T, 500);
k=randi([1,10], 500);
f = (lambda.^k) .* exp(-lambda) ./ factorial(k);
N = sum(f);
disp(N);
stairs(t,N)
Good luck
Sulaymon Eshkabilov
il 14 Mag 2020
0 voti
Why not to use MATLAB's built in fcn: poissrnd()
3 Commenti
Le Duc Long
il 25 Giu 2020
Hi Sulaymon Eshkabilov and Zeyneh Toprak,
I am also interested in this issue. My problem is to get the number of vehicles to an intersection with the Poisson distribution, lambda = 0.5 (vehicle/second). Can you help me code for vehicle traffic (numbers of vehicles) distributed by time period 500 seconds, step of time = 1 second?
Thanks so much!
Sa'adatu Abubakar
il 29 Lug 2021
Hello I'm also interested in the area please can you help me with the MATLAB code for poison arrival and general servive with single server?. Thank you
Sa'adatu Abubakar
il 29 Lug 2021
please I mean poisson arrival with general service and single server.
Najme Benvari
il 23 Mag 2023
0 voti
Hi I read the Poisson production code when the jump size is random and the intensity of the jumps is Stochastic and a CIR process. I will be very thankful.
1 Commento
Najme Benvari
il 25 Mag 2023
?
Categorie
Scopri di più su Poisson Distribution in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!