请大家注意matlab的提示信息,如下在slider的callback中给出了使用方法的;:
% --- Executes on slider movement.
function slider1_Callback(hObject, eventdata, handles)
% hObject handle to slider1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
Val = get(hObject,'Value');
ValStr = num2str(Val);
set(handles.edit1,'string',ValStr);