Changeset 179 for trunk/src/civ.m


Ignore:
Timestamp:
Jan 9, 2011, 12:56:28 PM (13 years ago)
Author:
sommeria
Message:

various bug repairs, in particular for 3D fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r178 r179  
    46234623box_test(4)=get(handles.CIV2,'Value');
    46244624box_test(5)=get(handles.FIX2,'Value');
    4625 box_test(6)=get(handles.PATCH2,'Value');
    4626 option=listtype{max(box_test(find(box_test)))};
     4625box_test(6)=get(handles.PATCH2,'Value')
     4626find(box_test)
     4627option_civ=max(find(box_test))
    46274628filecell=get(handles.civ,'UserData');
    46284629if ~isfield(filecell,'nc')
     
    46554656    for ifile=1:nbfiles
    46564657        detect=exist(civ_files{ifile},'file'); % check the existence of the file
     4658        option=0;
    46574659        if detect==0
    4658             lastfield='not created';
     4660            option_str='not created';
    46594661        else
    46604662            datfile=dir(civ_files{ifile});
     
    46654667            Data=nc2struct(civ_files{ifile},'ListGlobalAttribute','patch2','fix2','civ2','patch','fix');
    46664668            if ~isempty(Data.patch2) && isequal(Data.patch2,1)
    4667                 lastfield='patch2';
     4669                option=6;
     4670                option_str='patch2';
    46684671            elseif ~isempty(Data.fix2) && isequal(Data.fix2,1)
    4669                 lastfield='fix2';
     4672                option=5;
     4673                option_str='fix2';
    46704674            elseif ~isempty(Data.civ2) && isequal(Data.civ2,1);
    4671                 lastfield='civ2';
     4675                option=4;
     4676                option_str='civ2';
    46724677            elseif ~isempty(Data.patch) && isequal(Data.patch,1);
    4673                 lastfield='patch1';
     4678                option=3;
     4679                option_str='patch1';
    46744680            elseif ~isempty(Data.fix) && isequal(Data.fix,1);
    4675                 lastfield='fix1';
     4681                option=2;
     4682                option_str='fix1';
    46764683            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
    46814689            count=count+1;
    46824690        end
    46834691        [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];
    46854693    end
    46864694    if isempty(datnum)
Note: See TracChangeset for help on using the changeset viewer.