Changeset 12 for trunk/src/get_field.m
- Timestamp:
- Feb 16, 2010, 3:19:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_field.m
r5 r12 22 22 function varargout = get_field(varargin) 23 23 24 % Last Modified by GUIDE v2.5 0 8-Jan-2010 15:15:0624 % Last Modified by GUIDE v2.5 06-Feb-2010 09:58:13 25 25 26 26 % Begin initialization code - DO NOT EDIT … … 56 56 guidata(hObject, handles); 57 57 pathuvmat=fileparts(which('uvmat')); 58 %addpath(fullfile(pathuvmat,'FIELD_FCT'))58 addpath(fullfile(pathuvmat,'FIELD_FCT')) 59 59 set(handles.attributes,'enable','on')% TO BE SET BY GUIDE 60 60 set(hObject,'WindowButtonUpFcn',{@mouse_up_gui,handles})%set mouse click action function … … 113 113 114 114 115 116 117 118 119 115 %----------------------------------------------------------- 120 116 % --- Outputs from this function are returned to the command line. … … 125 121 % --- Executes on button press in browse. 126 122 function browse_Callback(hObject, eventdata, handles) 127 128 129 123 130 124 … … 768 762 end 769 763 haxes=findobj(hfig,'Type','axes'); 770 771 764 plot_field(SubField,haxes) 772 765 end … … 1484 1477 list_path=get(handles.ACTION,'UserData'); 1485 1478 nb_builtin=0; 1486 list_path1487 1479 if 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 else1492 break1493 end1494 end1480 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 1495 1487 end 1496 1488 if nb_builtin==0% the path to get_field has been changed, reinitialize … … 1652 1644 %default setting for the visibility of the GUI elements* 1653 1645 if ~isequal(ACTION,'PLOT') 1654 varargout=feval(ACTION) ;% input list asked by the selected function1646 varargout=feval(ACTION)% input list asked by the selected function 1655 1647 test_1Dplot=[]; 1656 1648 test_scalar=[]; 1657 1649 test_vector=[]; 1658 for ilist=1:length(varargout) -11659 switch varargout{ilist }1650 for ilist=1:length(varargout) 1651 switch varargout{ilist,1} 1660 1652 %RootFile always visible 1661 1653 case 'check_1Dplot' 1662 test_1Dplot=isequal(lower(varargout{ilist +1}),'y');1654 test_1Dplot=isequal(lower(varargout{ilist,2}),'y') 1663 1655 case 'check_scalar' 1664 test_scalar=isequal(lower(varargout{ilist +1}),'y');1656 test_scalar=isequal(lower(varargout{ilist,2}),'y') 1665 1657 case 'check_vector' 1666 test_vector=isequal(lower(varargout{ilist +1}),'y');1658 test_vector=isequal(lower(varargout{ilist,2}),'y') 1667 1659 end 1668 1660 end … … 1725 1717 % end 1726 1718 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 1736 1720 1737 1721 %----------------------------------------------------- … … 1883 1867 testblank=findstr(fileinput,' ');%look for blanks 1884 1868 if ~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']) 1886 1870 return 1887 1871 end … … 1917 1901 % -------------------------------------------------------------------- 1918 1902 function MenuFile_1_Callback(hObject, eventdata, handles) 1919 % hObject handle to MenuFile_1 (see GCBO) 1903 fileinput=get(handles.MenuFile_1,'Label'); 1904 set(handles.inputfile,'String',fileinput) 1905 inputfile_Callback(hObject, eventdata, handles) 1906 1907 % -------------------------------------------------------------------- 1908 function MenuFile_2_Callback(hObject, eventdata, handles) 1909 fileinput=get(handles.MenuFile_2,'Label'); 1910 set(handles.inputfile,'String',fileinput) 1911 inputfile_Callback(hObject, eventdata, handles) 1912 1913 % -------------------------------------------------------------------- 1914 function MenuFile_3_Callback(hObject, eventdata, handles) 1915 fileinput=get(handles.MenuFile_3,'Label'); 1916 set(handles.inputfile,'String',fileinput) 1917 inputfile_Callback(hObject, eventdata, handles) 1918 1919 % -------------------------------------------------------------------- 1920 function MenuFile_4_Callback(hObject, eventdata, handles) 1921 fileinput=get(handles.MenuFile_4,'Label'); 1922 set(handles.inputfile,'String',fileinput) 1923 inputfile_Callback(hObject, eventdata, handles) 1924 1925 % -------------------------------------------------------------------- 1926 function MenuFile_5_Callback(hObject, eventdata, handles) 1927 fileinput=get(handles.MenuFile_5,'Label'); 1928 set(handles.inputfile,'String',fileinput) 1929 inputfile_Callback(hObject, eventdata, handles) 1930 1931 % -------------------------------------------------------------------- 1932 function MenuExportField_Callback(hObject, eventdata, handles) 1933 1934 1935 % -------------------------------------------------------------------- 1936 function MenuHelp_Callback(hObject, eventdata, handles) 1937 % hObject handle to MenuHelp (see GCBO) 1920 1938 % eventdata reserved - to be defined in a future version of MATLAB 1921 1939 % 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) 1940 path_to_uvmat=which ('uvmat');% check the path of uvmat 1941 pathelp=fileparts(path_to_uvmat); 1942 helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html'); 1943 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC') 1944 else 1945 web([helpfile '#get_field']) 1946 end 1947
Note: See TracChangeset
for help on using the changeset viewer.