Ignore:
Timestamp:
May 15, 2011, 11:17:08 PM (13 years ago)
Author:
sommeria
Message:

various bugs corrected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/name2display.m

    r138 r252  
    182182    subdir=[subdir extdir];
    183183end
     184
     185%resolve ambigous nomenclature types when the number of 0 is unknown (type %0...):
     186ind_zero=findstr('0',nom_type);
     187nb_zero=numel(ind_zero);
     188if ~isempty(ind_zero)
     189    for itest=0:nb_zero-1
     190        filename=name_generator(fullfile(RootPath,RootFile),1,1,ext,nom_type,1,1,1,subdir);
     191        if exist(filename,'file')
     192            break
     193        else
     194            nom_type(ind_zero(1))=[] % remove a zero in nom_type
     195        end
     196    end
     197end
Note: See TracChangeset for help on using the changeset viewer.