a b/slider1_CreateFcn.m
1
% --- Executes during object creation, after setting all properties.
2
function slider1_CreateFcn(hObject, eventdata, handles)
3
    % hObject    handle to slider1 (see GCBO)
4
    % eventdata  reserved - to be defined in a future version of MATLAB
5
    % handles    empty - handles not created until after all CreateFcns called
6
    
7
    % Hint: slider controls usually have a light gray background.
8
    if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
9
        set(hObject,'BackgroundColor',[.9 .9 .9]);
10
    end
11
    
12
    % Add the slider information the Handles
13
    handles.Threshold_Slider    = hObject;   
14
    
15
    % Default value
16
    hObject.Value               = 1;
17
    
18
    % Monitor these variables to run time intesive operations 
19
    handles.Previous_Threshold  = nan;
20
    handles.Current_Threshold   = hObject.Value;
21
    
22
    % Update handles structure
23
    guidata(hObject, handles);
24
    
25
end