Changeset 360 for trunk/src/fullfile_uvmat.m
 Timestamp:
 Jan 9, 2012, 1:16:35 AM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/fullfile_uvmat.m
r354 r360 36 36 37 37 function 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='';end40 % if ~exist('ext','var')41 % ext='';42 % end43 % if ~exist('nom_type','var')44 % nom_type='';45 % end46 % if ~ischar(ext),ext='';end47 % % idetect=0;48 % if ~exist('i1','var')  isempty(i1)  isnan(i1)49 % i1=1; %default50 % end51 % if ~exist('j1','var')  isempty(j1)  isnan(j1)52 % j1=1; %default53 % end54 % if ~exist('i2','var')  isempty(i2)  isnan(i2)55 % i2=i1; %default56 % end57 % if ~exist('j2','var')  isempty(j2)  isnan(j2)58 % j2=j1; %default59 % end60 % if ~exist('subdir','var') isempty(subdir)61 % subdir='' ; %default62 % end63 64 38 65 39 %% display help and test function in the absence of input arument … … 75 49 end 76 50 if isequal(j1,j2) 77 j2=[]; 51 j2=[];% suppress the secodn index if equal to the first 78 52 end 79 53 if ~exist('j1','var') … … 84 58 end 85 59 if isequal(i1,i2) 86 i2=[]; 60 i2=[];% suppress the secodn index if equal to the first 87 61 end 88 62 if ~exist('i1','var') … … 108 82 if ~isempty(r) 109 83 i1_str=num2str(i1,['%0' num2str(length(r.num1)) 'd']); 110 NomType=regexprep(NomType,['^' r.num1],''); 84 NomType=regexprep(NomType,['^' r.num1],''); 111 85 r=regexp(NomType,'^(?<num2>\d+)','names');%look for a pair i1i2 112 86 if ~isempty(r) 87 if ~isempty(i2) 113 88 sep2=''; 114 89 i2_str=num2str(i2,['%0' num2str(length(r.num2)) 'd']); 90 end 115 91 NomType=regexprep(NomType,['^' r.num2],''); 116 92 end … … 121 97 if ~isempty(regexp(NomType,'^[aA]')); 122 98 j1_str=num2stra(j1,NomType); 123 if ~isempty(regexp(NomType,'[bB]$')) ;99 if ~isempty(regexp(NomType,'[bB]$'))&& ~isempty(j2); 124 100 j2_str=num2stra(j2,NomType); 125 101 end … … 130 106 NomType=regexprep(NomType,['^' r.num3],''); 131 107 end 108 if ~isempty(j2) 132 109 r=regexp(NomType,'(?<num4>\d+)','names'); 133 if ~isempty(r) && ~isempty(j2)110 if ~isempty(r) 134 111 sep4=''; 135 112 j2_str=num2str(j2,['%0' num2str(length(r.num4)) 'd']); 113 end 136 114 end 137 115 end
Note: See TracChangeset
for help on using the changeset viewer.