
Simevents: entity generator and insert pattern with non periodic sequences
조회 수: 3 (최근 30일)
이전 댓글 표시
I am trying to generate an entity with an specific intergeneration time sequence, and I am not able to make it. The tools helps on generating random and periodic sequences but this is not matchng my requested pattern. This is [0.002 0.016 0.016 0.016...]. The value 0016 remains constant to the end, and the simulation has to be launched for 2 minutes...I supose that there is a way to generate this with Matlab programming, but I not famiiar with this. I have two questions: 1/ Could you please can send me the Matlab Code to generate the sequence? 2/ The root cause...could you please send me some information (links, title for books,...) for get the proper expertise for Matlab coding?
Thanks in advance...
댓글 수: 0
답변 (1개)
Adit Kirtani
2023년 3월 23일
편집: Adit Kirtani
2023년 3월 23일
Hi José,
For your first question, if you have a sequence of values from which you wish to set an intergeneration time, you can use the "Event Actions Assistant".

You can set your desired sequence and modify the if condition after the sequence definition to ensure the sequence always checks the second index (which in your case is the value of 0.016). By default, it is set to return to the first index.
if idx > numel(SEQ)
idx = 2;
end
As for learning MATLAB, a good resource to learn MATLAB programming would be to complete the MATLAB Onramp. You can view the course here:
I hope this helps,
Adit Kirtani.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!