Changeset 179 for trunk/src/civ.m
- Timestamp:
- Jan 9, 2011, 12:56:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r178 r179 4623 4623 box_test(4)=get(handles.CIV2,'Value'); 4624 4624 box_test(5)=get(handles.FIX2,'Value'); 4625 box_test(6)=get(handles.PATCH2,'Value'); 4626 option=listtype{max(box_test(find(box_test)))}; 4625 box_test(6)=get(handles.PATCH2,'Value') 4626 find(box_test) 4627 option_civ=max(find(box_test)) 4627 4628 filecell=get(handles.civ,'UserData'); 4628 4629 if ~isfield(filecell,'nc') … … 4655 4656 for ifile=1:nbfiles 4656 4657 detect=exist(civ_files{ifile},'file'); % check the existence of the file 4658 option=0; 4657 4659 if detect==0 4658 lastfield='not created';4660 option_str='not created'; 4659 4661 else 4660 4662 datfile=dir(civ_files{ifile}); … … 4665 4667 Data=nc2struct(civ_files{ifile},'ListGlobalAttribute','patch2','fix2','civ2','patch','fix'); 4666 4668 if ~isempty(Data.patch2) && isequal(Data.patch2,1) 4667 lastfield='patch2'; 4669 option=6; 4670 option_str='patch2'; 4668 4671 elseif ~isempty(Data.fix2) && isequal(Data.fix2,1) 4669 lastfield='fix2'; 4672 option=5; 4673 option_str='fix2'; 4670 4674 elseif ~isempty(Data.civ2) && isequal(Data.civ2,1); 4671 lastfield='civ2'; 4675 option=4; 4676 option_str='civ2'; 4672 4677 elseif ~isempty(Data.patch) && isequal(Data.patch,1); 4673 lastfield='patch1'; 4678 option=3; 4679 option_str='patch1'; 4674 4680 elseif ~isempty(Data.fix) && isequal(Data.fix,1); 4675 lastfield='fix1'; 4681 option=2; 4682 option_str='fix1'; 4676 4683 else 4677 lastfield='civ1'; 4678 end 4679 end 4680 if strcmp(lastfield,option) 4684 option=1; 4685 option_str='civ1'; 4686 end 4687 end 4688 if option >= option_civ 4681 4689 count=count+1; 4682 4690 end 4683 4691 [rr,filename,ext]=fileparts(civ_files{ifile}); 4684 Tabchar{ifile,1}=[fullfile([subdir extdir],filename) ext '...' lastfield];4692 Tabchar{ifile,1}=[fullfile([subdir extdir],filename) ext '...' option_str]; 4685 4693 end 4686 4694 if isempty(datnum)
Note: See TracChangeset
for help on using the changeset viewer.