I have GUI in Matlab that I have made using the Programmatic approach. It has 6 sliders and I want to be able to move one of them and have the others update as if i clicked them again but to stay in the same place. I am guessing I will need to use the set() function. Is there some function to do this in matlab already? I have been looking around. Any suggestions or something to point me in the right direction?
Share
If you are using
guide, you can access the other sliders from thehandlesvariable that is available in each callback.Set the
Valueproperty for them.In case you are using it programmaticaly, you can store the
handlesmanually.And your slider callback should be:
Edit A good practice in writing UI is separating the GUI logic from the actual data. You always change the data, and call
updateGUIroutine.Therefore, you can write your program like this:
And the callback should look like: