How to update a variable in a function after every 5 seconds?
2 ビュー (過去 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!