How to Generate Multiple Entities at Time 10 (sim events)

1 Ansicht (letzte 30 Tage)
Muhammad Asad Hanif
Muhammad Asad Hanif am 31 Jul. 2016
I am a beginner and wants to generate multiple entities at time 10. I found the following code to generate 10 entities at time 0, however, I could not understand it that what should I change to generate entities after a specific time.
Code
N=10;
persistent dtArray index
if isempty(dtArray)
dtArray = [zeros (1, N) inf];
index = 1;
end
dt = dtArray (index);
index = index + 1;
  1 Kommentar
Muhammad Asad Hanif
Muhammad Asad Hanif am 31 Jul. 2016
I used entity gate to control the entities and got my desired result, but do let me know if there is any more appropriate logarithm for this job.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Discrete-Event Simulation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by