How can i simulate a generic poisson process?
6 次查看(过去 30 天)
显示 更早的评论
As the title says i am currently trying (and succeded, I think) to simulate a Poisson process. I do need help in order to plot the step function.
I saved the times of the process in a vector called Tn, which contains these randomly generated values:
Tn = [0 1.3985 3.7568 4.5718 7.2968 8.0168 8.9812 9.8139]
As i said in the first line, how do i plot the step function? (The values of Tn are inserted in the X-axis of course).
Thanks in advance!
0 个评论
采纳的回答
John D'Errico
2023-5-4
编辑:John D'Errico
2023-5-4
Not sure how you built the vector. Is it a Poisson process? Could be. :) As I recall, if you have exponential inter-rarrival times, the result will be Poisson. Its been a long time though since I cared about those things. But that suggests you can use a tool like exprnd to generate the interarrivals, then form a cumulative sum, using cumsum. And, of course, exprnd is a trivial thing to replace, even if you were not allowed to use that specific tool.
Anyway, I assume you are asking to generate steps like this:
Tn = [0 1.3985 3.7568 4.5718 7.2968 8.0168 8.9812 9.8139];
stairs(Tn,0:numel(Tn)-1)
2 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!