Clear Filters
Clear Filters

How to Determine the current/next Simulink TimeStep when running a simulation?

11 views (last 30 days)
Hi There,
I have a 'Matlab Function' block in a simulink model. I need to multiply a particular variable by the current/next timestep as the simulation is run - how exactly do I do this/ get the timestep data?
Also is there anyway to get the the simulation runtime as a variable from matlab rather than having to enter manually?

Answers (1)

A Jenkins
A Jenkins on 4 Mar 2015
Are you looking for the Clock block?


Find more on Simulink Functions in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!