menu_bathy_files_Callback.m 517 Bytes
function menu_bathy_files_Callback(hObject, eventdata, handles)

global bathy S

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

if isstruct(S)
    S.z = bathy(S.lon,S.lat) ;
else
    msgbox('WARNING! load GPS file first and then reload bathymetry. No Z computed !') ;
end

% Update handles structure
guidata(hObject, handles);

end