How do I pass variables between timer callback functions?
Show older comments
I have a timer and I initialise data in the StartFcn callback and manipulate that data in my TimerFcn callback. However, these callbacks have different scopes, and each time the TimerFcn is evaluated the workspace is cleared.
Is there a way of passing data between my StartFcn callback and the TimerFcn callback? And how can I have my TimerFcn manipulate the same variables each time without having to use persistent variables?
Accepted Answer
More Answers (0)
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!