I would like to write a matlab code by using this definition of poisson process
here, I want to simulate a poisson process, where n is chosen randomly between 1 and 10, lambda = 9 for 200 variates.
The codes that I wrote are totally wrong, so I cant post them, please give me a way or hint to do that. Thanks a lot.
My code is as follows:
n = randi ([1,10], 100);
if P == (lambda * t)^n/factorial(n) * e(-lambda * t)
N = n
N_sum = cumsum(N);