Changeset 12 for trunk/src/get_field.m


Ignore:
Timestamp:
Feb 16, 2010, 3:19:38 PM (14 years ago)
Author:
gostiaux
Message:

The files from uvmat.2.2.beta that differed from the current version have been updated.
Now the /raid/soft/UVMAT/src should be operational

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r5 r12  
    2222function varargout = get_field(varargin)
    2323
    24 % Last Modified by GUIDE v2.5 08-Jan-2010 15:15:06
     24% Last Modified by GUIDE v2.5 06-Feb-2010 09:58:13
    2525
    2626% Begin initialization code - DO NOT EDIT
     
    5656guidata(hObject, handles);
    5757pathuvmat=fileparts(which('uvmat'));
    58 % addpath(fullfile(pathuvmat,'FIELD_FCT'))
     58addpath(fullfile(pathuvmat,'FIELD_FCT'))
    5959set(handles.attributes,'enable','on')% TO BE SET BY GUIDE
    6060set(hObject,'WindowButtonUpFcn',{@mouse_up_gui,handles})%set mouse click action function
     
    113113
    114114
    115 
    116 
    117 
    118 
    119115%-----------------------------------------------------------
    120116% --- Outputs from this function are returned to the command line.
     
    125121% --- Executes on button press in browse.
    126122function browse_Callback(hObject, eventdata, handles)
    127 
    128 
    129123
    130124
     
    768762end
    769763haxes=findobj(hfig,'Type','axes');
    770 
    771764plot_field(SubField,haxes)
    772765end
     
    14841477list_path=get(handles.ACTION,'UserData');
    14851478nb_builtin=0;
    1486 list_path
    14871479if iscell(list_path)
    1488 for ilist=1:length(list_path)
    1489     if isequal(list_path{ilist},path_get_field)
    1490         nb_builtin=nb_builtin+1;
    1491     else
    1492         break
    1493     end
    1494 end
     1480    for ilist=1:length(list_path)
     1481        if isequal(list_path{ilist},path_get_field)
     1482            nb_builtin=nb_builtin+1;
     1483        else
     1484            break
     1485        end
     1486    end
    14951487end
    14961488if nb_builtin==0% the path to get_field has been changed, reinitialize
     
    16521644%default setting for the visibility of the GUI elements*
    16531645if ~isequal(ACTION,'PLOT')
    1654     varargout=feval(ACTION);% input list asked by the selected function
     1646    varargout=feval(ACTION)% input list asked by the selected function
    16551647    test_1Dplot=[];
    16561648    test_scalar=[];
    16571649    test_vector=[];
    1658     for ilist=1:length(varargout)-1
    1659         switch varargout{ilist}
     1650    for ilist=1:length(varargout)
     1651        switch varargout{ilist,1}
    16601652                           %RootFile always visible
    16611653            case 'check_1Dplot'   
    1662                  test_1Dplot=isequal(lower(varargout{ilist+1}),'y');
     1654                 test_1Dplot=isequal(lower(varargout{ilist,2}),'y')
    16631655            case 'check_scalar'
    1664                  test_scalar=isequal(lower(varargout{ilist+1}),'y');   
     1656                 test_scalar=isequal(lower(varargout{ilist,2}),'y')   
    16651657            case 'check_vector'   
    1666                  test_vector=isequal(lower(varargout{ilist+1}),'y');
     1658                 test_vector=isequal(lower(varargout{ilist,2}),'y')
    16671659        end
    16681660    end
     
    17251717% end
    17261718
    1727 % --- Executes on selection change in menu_coord.
    1728 function HELP_Callback(hObject, eventdata, handles)
    1729 path_to_uvmat=which ('uvmat');% check the path of uvmat
    1730 pathelp=fileparts(path_to_uvmat);
    1731 helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html');
    1732 if isempty(dir(helpfile)), errordlg('Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC')
    1733 else
    1734 web([helpfile '#get_field'])   
    1735 end
     1719
    17361720
    17371721%-----------------------------------------------------
     
    18831867testblank=findstr(fileinput,' ');%look for blanks
    18841868if ~isempty(testblank)
    1885     warndlg_uvmat(['The input file name ' fileinput ' contains blank character : This is not allowed. Please change name'],'ERROR')
     1869    msgbox_uvmat('ERROR',['The input file name ' fileinput ' contains blank character : This is not allowed. Please change name'])
    18861870    return
    18871871end
     
    19171901% --------------------------------------------------------------------
    19181902function MenuFile_1_Callback(hObject, eventdata, handles)
    1919 % hObject    handle to MenuFile_1 (see GCBO)
     1903fileinput=get(handles.MenuFile_1,'Label');
     1904set(handles.inputfile,'String',fileinput)
     1905inputfile_Callback(hObject, eventdata, handles)
     1906
     1907% --------------------------------------------------------------------
     1908function MenuFile_2_Callback(hObject, eventdata, handles)
     1909fileinput=get(handles.MenuFile_2,'Label');
     1910set(handles.inputfile,'String',fileinput)
     1911inputfile_Callback(hObject, eventdata, handles)
     1912
     1913% --------------------------------------------------------------------
     1914function MenuFile_3_Callback(hObject, eventdata, handles)
     1915fileinput=get(handles.MenuFile_3,'Label');
     1916set(handles.inputfile,'String',fileinput)
     1917inputfile_Callback(hObject, eventdata, handles)
     1918
     1919% --------------------------------------------------------------------
     1920function MenuFile_4_Callback(hObject, eventdata, handles)
     1921fileinput=get(handles.MenuFile_4,'Label');
     1922set(handles.inputfile,'String',fileinput)
     1923inputfile_Callback(hObject, eventdata, handles)
     1924
     1925% --------------------------------------------------------------------
     1926function MenuFile_5_Callback(hObject, eventdata, handles)
     1927fileinput=get(handles.MenuFile_5,'Label');
     1928set(handles.inputfile,'String',fileinput)
     1929inputfile_Callback(hObject, eventdata, handles)
     1930
     1931% --------------------------------------------------------------------
     1932function MenuExportField_Callback(hObject, eventdata, handles)
     1933
     1934
     1935% --------------------------------------------------------------------
     1936function MenuHelp_Callback(hObject, eventdata, handles)
     1937% hObject    handle to MenuHelp (see GCBO)
    19201938% eventdata  reserved - to be defined in a future version of MATLAB
    19211939% handles    structure with handles and user data (see GUIDATA)
    1922 
    1923 
    1924 % --------------------------------------------------------------------
    1925 function MenuFile_2_Callback(hObject, eventdata, handles)
    1926 % hObject    handle to MenuFile_2 (see GCBO)
    1927 % eventdata  reserved - to be defined in a future version of MATLAB
    1928 % handles    structure with handles and user data (see GUIDATA)
    1929 
    1930 
    1931 % --------------------------------------------------------------------
    1932 function MenuFile_3_Callback(hObject, eventdata, handles)
    1933 % hObject    handle to MenuFile_3 (see GCBO)
    1934 % eventdata  reserved - to be defined in a future version of MATLAB
    1935 % handles    structure with handles and user data (see GUIDATA)
    1936 
    1937 
    1938 % --------------------------------------------------------------------
    1939 function MenuFile_4_Callback(hObject, eventdata, handles)
    1940 % hObject    handle to MenuFile_4 (see GCBO)
    1941 % eventdata  reserved - to be defined in a future version of MATLAB
    1942 % handles    structure with handles and user data (see GUIDATA)
    1943 
    1944 
    1945 % --------------------------------------------------------------------
    1946 function MenuFile_5_Callback(hObject, eventdata, handles)
    1947 % hObject    handle to MenuFile_5 (see GCBO)
    1948 % eventdata  reserved - to be defined in a future version of MATLAB
    1949 % handles    structure with handles and user data (see GUIDATA)
    1950 
    1951 
    1952 % --------------------------------------------------------------------
    1953 function ExportField_Callback(hObject, eventdata, handles)
    1954 % hObject    handle to ExportField (see GCBO)
    1955 % eventdata  reserved - to be defined in a future version of MATLAB
    1956 % handles    structure with handles and user data (see GUIDATA)
     1940path_to_uvmat=which ('uvmat');% check the path of uvmat
     1941pathelp=fileparts(path_to_uvmat);
     1942helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html');
     1943if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC')
     1944else
     1945web([helpfile '#get_field'])   
     1946end
     1947
Note: See TracChangeset for help on using the changeset viewer.