I don't know how to do event based simulation in matlab. Just need a start for it, this question is a start part of my bigger task.
i have this,
Arrival Departure frequencies
0.0000 5.9489 0
0.0000 6.6353 0
0.0001 6.9292 0
0.0001 6.9361 0
0.0001 7.2979 0
0.0001 7.7989 0
0.0002 7.9419 0
0.0002 8.8358 0
0.0002 8.8383 0
0.0002 9.0600 0
First column is my event_arrivals and the 2nd column is event_departure. I want to change the value of third column from 0 to 1 when the simulation is in between arrival time and the departure time.
Once the event_departure arrives it again back set to O. Thank you so much.
You will need the Matlab SimEvents® Toolbox.
There are free alternatives like Function Chart V.3.2 which with I made good experiences.
I once tried to write an event driven simulation by myself and implement it in Simulink, it's possible, but quite some pain in the ass and definitely too much as an answer for this question.