function upload_Callback(hObject, eventdata, handles)
guidata(hObject, handles);
[FileName1,PathName1] = uigetfile({'*.xls';'*.txt';'*.csv';'*.*'},'Select the text file that contains the data');
if isempty(FileName1)
errordlg('No file was selected that contains the data so the calculation was aborted.');
flag = true;
return
end
S3.selected_dir_upload =fullfile(PathName1,FileName1);
handles.S3.selected_dir_upload =S3.selected_dir_upload ;
[S3.num, S3.txt]=xlsread(S3.selected_dir_upload)
set(handles.upload_file, 'String', S3.selected_dir_upload)
set(handles.upload, 'UserData', S3);
function popupmenu1_Callback(hObject, eventdata, handles)
S3 = get(handles.upload, 'UserData');
set(handles.popupmenu1,'String',S3.txt);