Ignore:
Timestamp:
Jul 29, 2024, 9:43:17 AM (2 months ago)
Author:
sommeria
Message:

civ3D updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r1127 r1164  
    4949
    5050%% get input root name and info on the input file
    51 if isempty(regexp(FilePath,'^http://','once'))
     51if isempty(regexp(FilePath,'^http://','once'))% case of usual file input
    5252fullfileinput=fullfile(FilePath,fileinput);% input file name with path
    5353else
    54   fullfileinput=[FilePath '/' fileinput];
     54  fullfileinput=[FilePath '/' fileinput]; % case of web input
    5555end
    5656[FileInfo,MovieObject]=get_file_info(fullfileinput);
     
    105105        sep2='';
    106106        i1_str='(?<i1>)';%will set i1=[];
    107         i1_star='';
    108107        i2_str='(?<i2>)';%will set i2=[];
    109         i2_star='';
    110108        j1_str='(?<j1>)';%will set j1=[];
    111         j1_star='';
    112109        j2_str='(?<j2>)';%will set j2=[];
    113         j2_star='';
     110
    114111        %Look for cases with letter indexing for the second index
    115112        r=regexp(NomType,'^(?<sep1>_?)(?<i1>\d+)(?<sep2>_?)(?<j1>[a|A])(?<j2>[b|B]?)$','names');
     
    118115            sep2=r.sep2;
    119116            i1_str='(?<i1>\d+)';
    120             i1_star='*';
    121117            if strcmp(lower(r.j1),r.j1)% lower case index
    122118                j1_str='(?<j1>[a-z])';
     
    124120                j1_str='(?<j1>[A-Z])'; % upper case index
    125121            end
    126             j1_star='*';
    127122            if ~isempty(r.j2)
    128123                if strcmp(lower(r.j1),r.j1)
     
    131126                    j2_str='(?<j2>[A-Z])';
    132127                end
    133                 j2_star='*';
    134128            end
    135129        else %numerical indexing
     
    138132                sep1=r.sep1;
    139133                i1_str='(?<i1>\d+)';
    140                 i1_star='*';
    141134                if ~isempty(r.i2)
    142135                    i2_str='(?<i2>-\d+)';
    143                     i2_star='-*';
    144136                end
    145137                if ~isempty(r.j1)
    146138                    j1_str='(?<j1>_\d+)';
    147                     j1_star='_*';
    148139                end
    149140                if ~isempty(r.j2)
    150141                    j2_str='(?<j2>-\d+)';
    151                     j2_star='-*';
    152142                end
    153143            end
     
    290280            i1_series=i1_series(:,2)*ones(1,FileInfo.NumberOfFrames);%
    291281            i1_series=[zeros(size(i1_series,1),1) i1_series];
     282            if ~isempty(i2_series)
     283                i2_series=i2_series(:,2)*ones(1,FileInfo.NumberOfFrames);%
     284            i2_series=[zeros(size(i2_series,1),1) i2_series];
     285            end
    292286            j1_series=ones(size(i1_series,1),1)*(1:FileInfo.NumberOfFrames);%
    293287            j1_series=[zeros(size(i1_series,1),1) j1_series];
Note: See TracChangeset for help on using the changeset viewer.