but_get_time_step_Callback.m 451 Bytes
function but_get_time_step_Callback(hObject, eventdata, handles)

global S

I0 = str2num(handles.edit_I0.String) ;
If = str2num(handles.edit_If.String) ;

% get time step and convert to seconds
t    = S.dnum(I0:If) ;
step = median(diff(t)*24*3600) ;

% update display
handles.edit_interpolate_step.String = num2str(floor(step)) ;
handles.edit_get_time_step.String    = num2str(floor(step)) ;

% Update handles structure
guidata(hObject, handles);

end