How to save the time of the simulink simulation on matlab?
7 次查看(过去 30 天)
显示 更早的评论
Hello,
I need to create an "if" block on simulink, the block must be triggered when the simulation time is =0. My idea was to save the simulation time of simulink on a matlab variable and then to use it on simulink in a constant block.
Someone knows how to do that?
1 个评论
Mathieu NOE
2020-10-26
hello
I have some difficulty to understand what your intention is
what is the reason to trigger (once ?) at t= 0 ?
or do you want to save a "hit" time when the trigger condition occurs ?
回答(1 个)
Fangjun Jiang
2020-10-26
Use the Clock block in your Simulink model. It outputs the simulation time. Do whatever you want.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!