I'm using GUIDE in Matlab to create a slider, and am trying to store this variable as a global variable so that I can use it in simulink. Is there any way that I can do this? I have written an .m file that says
(Where sliderValue is already defined in the code before it.)
sRT1 = sliderValue
But this doesnt seem to actually update the variable.
If I manually define the variable in the matlab workspace eg "temperature1 = 34" then the variable shows in simulink as 34. If I run the GUIDE program I have written and move the slider around, the matlab workspace shows that "temperature1 = 45.6" (or whatever the slider value is). However, when I run the simulink program again, the value still shows as 34. (or the previously defined value that I have manually set in the MATLAB workspace).
Sorry for the rather unorganised post, thanks for reading it.
Does anybody have any idea why this is happening?
This might be an insight into why this is happening.
Ignore the bottom 3 sliders, they for when I get the top one working.