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?
Best Answer