How to let a function know that a variable in another function has been updated?
Show older comments
Hi all, my first post here.
I'm just learning Matlab and I stumbled on a problem I'm unable to resolve on my own.
I have a GUIDE dialog box with a text input field. I am able to catch changes/user inputs in that text field via fieldTag_Callback function.
I have another function that is using that same input to perform certain calculations. The problem I have is I do not know how to let the latter function know that there has been an update in the fariable in the former function. I'm wondering which functions or methods I should use to "push" a notification to the second function so it would activate and redo whatever it needs to do, based on the new, updated value in the first function. The problem right now is, the second function will just do what it started doing the first time it was invoked, regardless if the change is initiated or not.
Not sure if I managed to explain what I'm trying to achieve properly, so please let me know.
Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Programming 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!