Changeset 138 for trunk/src/name2display.m
- Timestamp:
- Nov 26, 2010, 5:44:41 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/name2display.m
r122 r138 74 74 %case of a numerical index follewed by a lower case letter (e.g. a,b,c): 75 75 %the penultimate character is a number and the last one a letter (lower case: last >= 97 && last <= 122 76 % capital letter: last >= 65 && last <= 90) 77 elseif penult >= 48 && penult <= 57 && (last >= 65 && last <= 90)||(last >= 97 && last <= 122) 76 % capital 77 % letter: last >= 65 && last <= 90) 78 elseif penult >= 48 && penult <= 57 && ((last >= 65 && last <= 90)||(last >= 97 && last <= 122)) 78 79 str_a=last_str; %extract appendix a,b,c... or A,B,C... as output. 79 80 ind_end=indcur-1; %current index just before the suffix letter … … 129 130 elseif strcmp(filelit(end),'_') 130 131 indcur=separ3-1; 131 % field_count=num3;132 132 str2=''; 133 133 str_a=''; 134 134 %detect zeros before the number 135 % count=0; % extract the numerical appendix136 135 field_count=RootFile(separ3+1:end);% set the selected field number'%03d' 137 136 charstring=['%0' num2str(length(field_count)) 'd']; 138 137 nom_type=['_' num2str(1,charstring)]; 139 % if strcmp('0',RootFile(separ3+1)); % select the non-numerical characters140 % nom_type=['_%0' num2str(length(RootFile(separ3+1:end))) 'd'];141 % else142 % nom_type='_i';143 % end144 145 138 elseif RootFile(indcur-2)=='_'% search appendix a,b,c,d 146 last=RootFile(indcur-1:indcur); 147 if isequal(length(last),2) 148 str_a=last(1);%put appendix a,b,c, ou d 149 str_b=last(2);%put appendix a,b,c, ou d 150 % indcur=indcur-3; 151 separ0=indsel(end-3); 139 lasts=RootFile(indcur-1:indcur); 140 % if isequal(length(last),2) 141 str_a=lasts(1);%put appendix a,b,c, ou d 142 str_b=lasts(2);%put appendix a,b,c, ou d 143 separ0=indsel(end-3); 152 144 field_count=RootFile(separ0+1:separ1-1); 153 145 indcur=separ0; 154 if double(last ) >= 97 & double(last)<= 122146 if double(lasts) >= 97 & double(lasts)<= 122 155 147 nom_type='_ab'; 156 148 testsub=1; 157 elseif double(last ) >= 65 & double(last) <= 90149 elseif double(lasts) >= 65 & double(lasts) <= 90 158 150 nom_type='_AB'; 159 151 testsub=1; … … 161 153 charstring=['%0' num2str(length(field_count)) 'd']; 162 154 nom_type=[num2str(1,charstring) nom_type]; 163 end155 % end 164 156 %search for other names with counter 165 157 else … … 178 170 charstring=['%0' num2str(length(field_count)) 'd']; 179 171 nom_type=num2str(1,charstring); 180 % if isequal(field_count(1),'0')181 % nbfigures=length(field_count);182 % nom_type=['%0' num2str(nbfigures) 'd'];183 % else184 % nom_type='#';185 % end186 172 end 187 173 end
Note: See TracChangeset
for help on using the changeset viewer.