How to update a variable in a function after every 5 seconds?
3 次查看(过去 30 天)
显示 更早的评论
I have some variable 'x' which is changing continuously in the backgroud simulation. I want to store the value of x in variable "y" after every 5 seconds.
How do I do it?
0 个评论
回答(1 个)
Birdman
2020-4-7
Run the attached model and see the results. You can change the Ramp block's Slope value and store different numbers. Output of the MATLAB Function block stores dynamically the values at every 5 seconds.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!