How to get current time of simulation while Model is executing.

377 views (last 30 days)
Kumar Nikhil
Kumar Nikhil on 3 Jan 2013
Edited: Piotr Kluczek on 15 Jul 2022
I want to execute many test cases one by one. For this,I want to execute a test case after every 50 simulation seconds. For this I want to get simulation time data runtime. Thank you.

Accepted Answer

TAB on 3 Jan 2013
To read the current simulation time of model from matlab, use
Piotr Kluczek
Piotr Kluczek on 15 Jul 2022
You can use this command to see for the selected block:

Sign in to comment.

More Answers (2)

Azzi Abdelmalek
Azzi Abdelmalek on 3 Jan 2013
You can use a clock block from simulink/sources with math function block (set to mod) and a constant block.
every 50s the output will be set to 0

Suneesh on 3 Jan 2013

Community Treasure Hunt

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

Start Hunting!

Translated by