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!