menu_files_Callback.m 904 Bytes
function menu_files_Callback(hObject, eventdata, handles)

global S cnt

%% Put the list of mat files in the file list menu
liste = get(hObject,'String') ;
I     = get(hObject,'Value') ;
file  = liste{I} ;
fpath = ['data/gps/raw/' file] ;
load(['data/gps/raw/' file]) ;

N = numel(data.timeM) ;
handles.edit_I0.String = '1' ;
handles.edit_If.String = num2str(N) ;

S   = struct('lon',data.lon,'lat',data.lat,'dnum',data.timeM) ;
cnt = 0 ; % reset output punch counter

axes(handles.ax_track) ;
plot(S.lon,S.lat,'b',S.lon,S.lat,'ko')

% Open a new logfile
if isfield(handles,'logfid') ; delete(handles.logfid) ; end % out with the old
logfid         = fopen(['log/' file(1:end-4) '.log'],'w') ; 
fprintf(logfid,'%s\n','Operation, I0, If, Parameter, New track size') ;
handles.logfid = logfid ;                                   % in  with the new

% Update handles structure
guidata(hObject, handles);
end