Retrieving data from slider
显示 更早的评论
I've been using GUIDE and I'm having trouble getting the value from the slider.
In the generated function
function slider1_Callback(hObject, eventdata, handles)
I can get the value with
sliderValue = get(handles.slider1,'Value')
But if I try using that in a user defined function I get this error:
??? Undefined variable "handles" or
class "handles.slider1".
Did I miss something?
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!