Ignore:
Timestamp:
Jan 9, 2012, 1:16:35 AM (12 years ago)
Author:
sommeria
Message:

civ: bugs corrected. Iintroduction of an xm file for parameters read using the new fct fill_GUI (to test and improve)
cleaning in uvmat. Possibility of using blank increment added (go to the next available file)
fullfile_uvmat: case of two equal indices in a pair, bug repair.
find_fileseries: improved speed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/fullfile_uvmat.m

    r354 r360  
    3636
    3737function filename=fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,i1,i2,j1,j2)
    38 % sizf=size(filebase);
    39 % if (~ischar(filebase)||~isequal(sizf(1),1)),filebase='';end
    40 % if ~exist('ext','var')
    41 %     ext='';
    42 % end
    43 % if ~exist('nom_type','var')
    44 %     nom_type='';
    45 % end
    46 % if ~ischar(ext),ext='';end
    47 % % idetect=0;
    48 % if ~exist('i1','var') || isempty(i1) || isnan(i1)
    49 %     i1=1; %default
    50 % end
    51 % if ~exist('j1','var') ||  isempty(j1) || isnan(j1)
    52 %     j1=1; %default
    53 % end
    54 % if ~exist('i2','var') ||  isempty(i2) || isnan(i2)
    55 %     i2=i1; %default
    56 % end
    57 % if ~exist('j2','var') || isempty(j2) || isnan(j2)
    58 %     j2=j1; %default
    59 % end
    60 % if ~exist('subdir','var')|| isempty(subdir)
    61 %     subdir='' ; %default
    62 % end
    63 
    6438   
    6539%% display help and test function in the absence of input arument
     
    7549end
    7650if isequal(j1,j2)
    77     j2=[];
     51    j2=[];% suppress the secodn index if equal to the first
    7852end
    7953if ~exist('j1','var')
     
    8458end
    8559if isequal(i1,i2)
    86     i2=[];
     60    i2=[];% suppress the secodn index if equal to the first
    8761end
    8862if ~exist('i1','var')
     
    10882if ~isempty(r)
    10983    i1_str=num2str(i1,['%0' num2str(length(r.num1)) 'd']);
    110     NomType=regexprep(NomType,['^' r.num1],'');
     84    NomType=regexprep(NomType,['^' r.num1],'');   
    11185    r=regexp(NomType,'^-(?<num2>\d+)','names');%look for a pair i1-i2
    11286    if ~isempty(r)
     87         if ~isempty(i2)
    11388        sep2='-';
    11489         i2_str=num2str(i2,['%0' num2str(length(r.num2)) 'd']);
     90         end
    11591         NomType=regexprep(NomType,['^-' r.num2],'');
    11692    end
     
    12197    if ~isempty(regexp(NomType,'^[a|A]'));
    12298        j1_str=num2stra(j1,NomType);
    123         if ~isempty(regexp(NomType,'[b|B]$'));
     99        if ~isempty(regexp(NomType,'[b|B]$'))&& ~isempty(j2);
    124100            j2_str=num2stra(j2,NomType);
    125101        end
     
    130106            NomType=regexprep(NomType,['^' r.num3],'');
    131107        end
     108        if ~isempty(j2)
    132109        r=regexp(NomType,'-(?<num4>\d+)','names');
    133         if ~isempty(r)&& ~isempty(j2)
     110        if ~isempty(r)
    134111            sep4='-';
    135112            j2_str=num2str(j2,['%0' num2str(length(r.num4)) 'd']);
     113        end
    136114        end
    137115    end
Note: See TracChangeset for help on using the changeset viewer.