Changeset 1180 for trunk/src/find_file_series.m
- Timestamp:
- Mar 27, 2025, 5:59:21 PM (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_file_series.m
r1164 r1180 63 63 j2_series=zeros(1,1,1); 64 64 checkfileindexing=1; 65 if isempty(regexp(FilePath,'^http://' )) && ~exist(FilePath,'dir')65 if isempty(regexp(FilePath,'^http://', 'once')) && ~exist(FilePath,'dir') 66 66 return % don't go further if the dir path does not exist 67 67 end … … 70 70 if isempty(NomType)||strcmp(NomType,'*') 71 71 if exist(fullfileinput,'file') 72 [ tild,RootFile]=fileparts(fileinput);% case of constant name (no indexing), get the filename without its extension72 [~,RootFile]=fileparts(fileinput);% case of constant name (no indexing), get the filename without its extension 73 73 else 74 74 RootFile=''; … … 159 159 % rr=regexp(dirpair(ifile).name,detect_string,'names'); 160 160 if ~isempty(rr{ifile}) 161 i1=str2 num(rr{ifile}.i1);162 i2=str2 num(regexprep(rr{ifile}.i2,'^-',''));161 i1=str2double(rr{ifile}.i1); 162 i2=str2double(regexprep(rr{ifile}.i2,'^-','')); 163 163 j1=stra2num(regexprep(rr{ifile}.j1,'^_','')); 164 164 j2=stra2num(regexprep(rr{ifile}.j2,'^-','')); 165 165 ref_i=i1; 166 166 if isempty(i2_input) 167 if ~is empty(i2)% invalid file name if i2 does not exist in the input file167 if ~isnan(i2)% invalid file name if i2 does not exist in the input file 168 168 break 169 169 end … … 173 173 ref_j=1; 174 174 if isempty(j1_input) 175 if ~is empty(j1)% invalid file name if j1 does not exist in the input file175 if ~isnan(j1)% invalid file name if j1 does not exist in the input file 176 176 break 177 177 end 178 178 else %j1_input is not empty 179 if is empty(j1)% the detected name does not fit with the input179 if isnan(j1)% the detected name does not fit with the input 180 180 break 181 181 else 182 182 ref_j=j1; 183 183 if isempty(j2_input) 184 if ~is empty(j2)% invalid file name if j2 does not exist in the input file184 if ~isnan(j2)% invalid file name if j2 does not exist in the input file 185 185 break 186 186 end … … 191 191 end 192 192 % update the detected index series 193 if ~isempty(ref_i)&&~isempty(ref_j) 193 if ~isnan(ref_i)&&~isnan(ref_j) 194 if ref_i*ref_j>100000 195 disp('warning: inapropriate file name indexing: too large indices for scanning') 196 ref_i_list(ifile)=i1_input; 197 if isempty(j1_input) 198 ref_j_list(ifile)=1; 199 else 200 ref_j_list(ifile)=j1_input; 201 end 202 break 203 end 194 204 ref_i_list(ifile)=ref_i; 195 205 ref_j_list(ifile)=ref_j;
Note: See TracChangeset
for help on using the changeset viewer.