Commit e3c57515bc48bc59ab3e05fd4b8bec91d15b4b95

Authored by Jean-Luc Shaw
1 parent 9030f344
Exists in master

Changed directory structure!

Showing 2 changed files with 18 additions and 7 deletions   Show diff stats
GUI_drifter_cleanup.m
... ... @@ -241,13 +241,6 @@ function but_get_time_step_Callback(hObject, eventdata, handles)
241 241  
242 242  
243 243  
244   -function edit_get_time_step_Callback(hObject, eventdata, handles)
245   -% hObject handle to edit_get_time_step (see GCBO)
246   -% eventdata reserved - to be defined in a future version of MATLAB
247   -% handles structure with handles and user data (see GUIDATA)
248   -
249   -% Hints: get(hObject,'String') returns contents of edit_get_time_step as text
250   -% str2double(get(hObject,'String')) returns contents of edit_get_time_step as a double
251 244  
252 245  
253 246 % --- Executes during object creation, after setting all properties.
... ...
lib/edit_get_time_step_Callback.m 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +function edit_get_time_step_Callback(hObject, eventdata, handles)
  2 +
  3 +global S
  4 +
  5 +I0 = str2num(handles.edit_I0.String) ;
  6 +If = str2num(handles.edit_If.String) ;
  7 +
  8 +% get time step and convert to seconds
  9 +t = S.dnum(I0:If) ;
  10 +step = median(diff(t)*24*3600) ;
  11 +
  12 +% update display
  13 +handles.edit_interpolate_step.String = num2str(floor(step)) ;
  14 +
  15 +% Update handles structure
  16 +guidata(hObject, handles);
  17 +
  18 +end
0 19 \ No newline at end of file
... ...