How to model exponential holding times? Please help.
Mostra commenti meno recenti
In my code, after performing some action (e.g. changing var=0 to var=1), I need to trigger a time which is representative of how long the var should be 1. I want to model it as exponential holding time as below
exprnd(5)
%outputs vary like 0.3414 or 1.9376 or 2.1120 or 8.8250...
Question: how can I know when to make the var=1 back to var=0 using this kind of output. The ouput is not a fixed integer count that I can keep decrementing. Any idea on how can I do this? Should I make use of system time?
Background: I have to make this var change multiple times. I.e. after trigerring for the above, I go back, get another input, perform the action (var=1) and then also do an exprnd(5) for that one. It is a dynamic system. Actions get removed (var reverted back) after a certain time and that time is modelled as exponential distribution.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Univariate Discrete Distributions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
