Changeset 188 for trunk/src/civ.m


Ignore:
Timestamp:
Feb 2, 2011, 1:22:05 AM (13 years ago)
Author:
sommeria
Message:

various bug repairs and cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r183 r188  
    46254625    hwaitbar=uicontrol('Style','frame','Units','normalized', 'Position',BarPosition ,'BackgroundColor',[1 0 0],'tag','waitbar');
    46264626end
    4627 datnum=[];
     4627% datnum=[];
    46284628Tabchar={};
    46294629nbfiles=numel(civ_files);
    46304630count=0;
     4631testrecent=0;
    46314632while count<nbfiles
    46324633    count=0;
     4634    datnum=zeros(1,nbfiles);
    46334635    for ifile=1:nbfiles
    46344636        detect=exist(civ_files{ifile},'file'); % check the existence of the file
     
    46374639            option_str='not created';
    46384640        else
    4639             datfile=dir(civ_files{ifile});
    4640             datnum(ifile)=datenum(datfile.date);
     4641            datfile=dir(civ_files{ifile})
     4642            if isfield(datfile,'datenum')
     4643                datnum(ifile)=datfile.datenum;%only available in recent matlab versions
     4644                testrecent=1;
     4645            end
    46414646            filefound(ifile)={datfile.name};
    46424647            lastfield='';
     
    46694674        Tabchar{ifile,1}=[fullfile([subdir extdir],filename) ext  '...' option_str];
    46704675    end
    4671     if isempty(datnum)
    4672          message='no civ result created yet';
     4676    datnum=datnum(find(datnum));%keep the non zero values corresponding to existing files
     4677    if isempty(datnum)
     4678        if testrecent
     4679            message='no civ result created yet';
     4680        else
     4681            message='';
     4682        end
    46734683    else
    46744684        datnum=datnum(find(datnum));%keep the non zero values corresponding to existing files
     
    47084718     ind_dot=findstr(filename,'...');
    47094719     filename=filename(1:ind_dot-1);
    4710       filename=fullfile(rootroot,filename)
     4720      filename=fullfile(rootroot,filename);
    47114721      if exist(filename,'file')%visualise the vel field if it exists
    47124722        %[Field,VelTypeOut]=read_civxdata(filename);
Note: See TracChangeset for help on using the changeset viewer.