Current simulation time in MATLAB System block
time = getCurrentTime(obj)
returns the current simulation time in the MATLAB System block. Call this method in the time
= getCurrentTime(obj
)stepImpl
method of your System object™.
If the MATLAB System block is operating in continuous sample time,
getCurrentTime
may return non-monotonic times due to solver
operation.