How to update a variable in a function after every 5 seconds?
조회 수: 5 (최근 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에서 Unit Conversions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!