[37] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
| 2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
| 3 | <html> |
---|
| 4 | <head> |
---|
| 5 | <title>Description of name2display</title> |
---|
| 6 | <meta name="keywords" content="name2display"> |
---|
| 7 | <meta name="description" content="'name2display': extracts the root name and field numbers from an input filename"> |
---|
| 8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
| 9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
| 10 | <meta name="robots" content="index, follow"> |
---|
| 11 | <link type="text/css" rel="stylesheet" href="../m2html.css"> |
---|
| 12 | </head> |
---|
| 13 | <body> |
---|
| 14 | <a name="_top"></a> |
---|
| 15 | <div><a href="../index.html">Home</a> > <a href="index.html">.</a> > name2display.m</div> |
---|
| 16 | |
---|
| 17 | <!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td> |
---|
| 18 | <td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
| 19 | |
---|
| 20 | <h1>name2display |
---|
| 21 | </h1> |
---|
| 22 | |
---|
| 23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
| 24 | <div class="box"><strong>'name2display': extracts the root name and field numbers from an input filename</strong></div> |
---|
| 25 | |
---|
| 26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
| 27 | <div class="box"><strong>function [RootPath,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput) </strong></div> |
---|
| 28 | |
---|
| 29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
| 30 | <div class="fragment"><pre class="comment">'name2display': extracts the root name and field numbers from an input filename |
---|
| 31 | -------------------------------------------------------------------- |
---|
| 32 | [RootPath,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput) |
---|
| 33 | |
---|
| 34 | OUTPUT: |
---|
| 35 | filebasesub: filename without appendix |
---|
| 36 | field_count: string for the first number i |
---|
| 37 | str2: string for the second number i (only for .nc files) |
---|
| 38 | str_a: string for the first number j |
---|
| 39 | str_b:string for the second number j (only for .nc files) |
---|
| 40 | ext: file extension |
---|
| 41 | nom_type: char chain characterizing the file nomenclature: with values |
---|
| 42 | nom_type='': constant name [filebase ext] (default output if 'nom_type' is undefined) |
---|
| 43 | nom_type='*':constant name for a file representing a series (e.g. avi movie) |
---|
| 44 | nom_type='_i': series of files with a single index i preceded by '_'(e.g. 'aa_45.png'). |
---|
| 45 | nom_type='#', series of indexed images wich is not series_i [filebase index ext], e.g. 'aa045.jpg' or 'aa45.tif' |
---|
| 46 | nom_type='_i_j': matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png') |
---|
| 47 | nom_type='_i1-i2': from pairs from a single index (e.g. 'aa_45-47.nc') |
---|
| 48 | nom_type='_i_j1-j2': pairs of j indices (e.g. 'aa_45_2-3.nc') |
---|
| 49 | nom_type='_i1-i2_j': pairs of i indices (e.g. 'aa_45-46_2.nc') |
---|
| 50 | nom_type='#a','#A", with a numerical index and an index letter(e.g.'aa045b.png') (lower or upper case) |
---|
| 51 | nom_type='raw_SMD', same as '#' but with no extension ext='', OBSOLETE |
---|
| 52 | nom_type='#_ab', from pairs of '#' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by '_i_j1-j2') |
---|
| 53 | subdir: name of the subdirectory for netcdf files |
---|
| 54 | |
---|
| 55 | INPUT: |
---|
| 56 | fileinput: complete name of the file, including path</pre></div> |
---|
| 57 | |
---|
| 58 | <!-- crossreference --> |
---|
| 59 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
| 60 | This function calls: |
---|
| 61 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
| 62 | </ul> |
---|
| 63 | This function is called by: |
---|
| 64 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
| 65 | <li><a href="civ.html" class="code" title="function varargout = civ(varargin)">civ</a> 'civ': function associated with the interface 'civ.fig' for PIV, spline interpolation and stereo PIV (patch)</li><li><a href="civ_3D.html" class="code" title="function varargout = civ_3D(varargin)">civ_3D</a> 'civ_3D': function associated with the interface 'civ_3D.fig' for PIV in volume</li><li><a href="geometry_calib.html" class="code" title="function varargout = geometry_calib(varargin)">geometry_calib</a> 'geometry_calib': performs geometric calibration from a set of reference points</li><li><a href="name_generator.html" class="code" title="function [filename,idetect,num_i1_out,num_j1_out,num_i2_out,num_j2_out,subdir_out]=name_generator(filebase,num_i1,num_j1,ext,nom_type,comp_input,num_i2,num_j2,subdir);">name_generator</a> 'name_generator': creates a file name from a root name and indices.</li><li><a href="probe_calib.html" class="code" title="function varargout = probe_calib(varargin)">probe_calib</a> 'probe_calib': performs geometric calibration from a set of reference points</li><li><a href="read_xls.html" class="code" title="function [hfig_xls]=read_xls(fileinput,hfig)">read_xls</a> 'read_xls': function for reading and displaying Excel files</li><li><a href="series.html" class="code" title="function varargout = series(varargin)">series</a> 'series': master function associated to the GUI series.m for analysis field series</li><li><a href="set_grid.html" class="code" title="function varargout = set_grid(varargin)">set_grid</a> 'set_grid':produce grid for PIV with one or two images (stereo case)</li><li><a href="uvmat.html" class="code" title="function varargout = uvmat(varargin)">uvmat</a> 'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization</li></ul> |
---|
| 66 | <!-- crossreference --> |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
| 70 | <div class="fragment"><pre>0001 <span class="comment">%'name2display': extracts the root name and field numbers from an input filename</span> |
---|
| 71 | 0002 <span class="comment">%--------------------------------------------------------------------</span> |
---|
| 72 | 0003 <span class="comment">%[RootPath,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput)</span> |
---|
| 73 | 0004 <span class="comment">%</span> |
---|
| 74 | 0005 <span class="comment">%OUTPUT:</span> |
---|
| 75 | 0006 <span class="comment">%filebasesub: filename without appendix</span> |
---|
| 76 | 0007 <span class="comment">%field_count: string for the first number i</span> |
---|
| 77 | 0008 <span class="comment">%str2: string for the second number i (only for .nc files)</span> |
---|
| 78 | 0009 <span class="comment">%str_a: string for the first number j</span> |
---|
| 79 | 0010 <span class="comment">%str_b:string for the second number j (only for .nc files)</span> |
---|
| 80 | 0011 <span class="comment">%ext: file extension</span> |
---|
| 81 | 0012 <span class="comment">%nom_type: char chain characterizing the file nomenclature: with values</span> |
---|
| 82 | 0013 <span class="comment">% nom_type='': constant name [filebase ext] (default output if 'nom_type' is undefined)</span> |
---|
| 83 | 0014 <span class="comment">% nom_type='*':constant name for a file representing a series (e.g. avi movie)</span> |
---|
| 84 | 0015 <span class="comment">% nom_type='_i': series of files with a single index i preceded by '_'(e.g. 'aa_45.png').</span> |
---|
| 85 | 0016 <span class="comment">% nom_type='#', series of indexed images wich is not series_i [filebase index ext], e.g. 'aa045.jpg' or 'aa45.tif'</span> |
---|
| 86 | 0017 <span class="comment">% nom_type='_i_j': matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png')</span> |
---|
| 87 | 0018 <span class="comment">% nom_type='_i1-i2': from pairs from a single index (e.g. 'aa_45-47.nc')</span> |
---|
| 88 | 0019 <span class="comment">% nom_type='_i_j1-j2': pairs of j indices (e.g. 'aa_45_2-3.nc')</span> |
---|
| 89 | 0020 <span class="comment">% nom_type='_i1-i2_j': pairs of i indices (e.g. 'aa_45-46_2.nc')</span> |
---|
| 90 | 0021 <span class="comment">% nom_type='#a','#A", with a numerical index and an index letter(e.g.'aa045b.png') (lower or upper case)</span> |
---|
| 91 | 0022 <span class="comment">% nom_type='raw_SMD', same as '#' but with no extension ext='', OBSOLETE</span> |
---|
| 92 | 0023 <span class="comment">% nom_type='#_ab', from pairs of '#' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by '_i_j1-j2')</span> |
---|
| 93 | 0024 <span class="comment">%subdir: name of the subdirectory for netcdf files</span> |
---|
| 94 | 0025 <span class="comment">%</span> |
---|
| 95 | 0026 <span class="comment">%INPUT:</span> |
---|
| 96 | 0027 <span class="comment">%fileinput: complete name of the file, including path</span> |
---|
| 97 | 0028 |
---|
| 98 | 0029 <a name="_sub0" href="#_subfunctions" class="code">function [RootPath,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput)</a> |
---|
| 99 | 0030 <span class="comment">% siz=length(fileinput);</span> |
---|
| 100 | 0031 <span class="comment">% indcur=siz;</span> |
---|
| 101 | 0032 <span class="comment">% default values:</span> |
---|
| 102 | 0033 <span class="comment">% test_=0;</span> |
---|
| 103 | 0034 field_count=<span class="string">''</span>;<span class="comment">%character string</span> |
---|
| 104 | 0035 str2=<span class="string">''</span>; |
---|
| 105 | 0036 str_a=<span class="string">''</span>; |
---|
| 106 | 0037 str_b=<span class="string">''</span>; |
---|
| 107 | 0038 <span class="comment">% ext='';</span> |
---|
| 108 | 0039 nom_type=<span class="string">''</span>; |
---|
| 109 | 0040 subdir=<span class="string">''</span>; |
---|
| 110 | 0041 <span class="comment">%select file extension</span> |
---|
| 111 | 0042 [RootPath,RootFile,ext]=fileparts(fileinput); |
---|
| 112 | 0043 indcur=length(RootFile);<span class="comment">% nbre of characters in fileraw</span> |
---|
| 113 | 0044 |
---|
| 114 | 0045 <span class="comment">%recognize the name form</span> |
---|
| 115 | 0046 filerawascii=double(RootFile);<span class="comment">%ascci code</span> |
---|
| 116 | 0047 val=(48>filerawascii)|(filerawascii>57); <span class="comment">% test for the non-numerical characters</span> |
---|
| 117 | 0048 indsel=find(val);<span class="comment">% character indices of non numerical characters</span> |
---|
| 118 | 0049 filelit=RootFile(indsel);<span class="comment">% fileraw name with numbers removed</span> |
---|
| 119 | 0050 nbchar=length(indsel); |
---|
| 120 | 0051 <span class="keyword">if</span> nbchar<4<span class="comment">% put '*' before the name (remove at the end)</span> |
---|
| 121 | 0052 prefilelit(1:4-nbchar)=<span class="string">'*'</span>;<span class="comment">%insert 3_nbchar '*' in the file name</span> |
---|
| 122 | 0053 filelit=[prefilelit filelit]; |
---|
| 123 | 0054 indsel=[1:4-nbchar indsel+4-nbchar]; |
---|
| 124 | 0055 RootFile=[prefilelit RootFile]; |
---|
| 125 | 0056 indcur=indcur+4-nbchar; |
---|
| 126 | 0057 <span class="keyword">end</span> |
---|
| 127 | 0058 separ3=indsel(end);<span class="comment">% index of last non numerical character in fileraw</span> |
---|
| 128 | 0059 separ2=indsel(end-1);<span class="comment">% index of previous non numerical character</span> |
---|
| 129 | 0060 separ1=indsel(end-2); |
---|
| 130 | 0061 separ0=indsel(end-3); |
---|
| 131 | 0062 num1=<span class="string">''</span>;num2=<span class="string">''</span>;num3=<span class="string">''</span>; |
---|
| 132 | 0063 <span class="keyword">if</span> separ1>=separ0+1,num0=RootFile(separ0+1:separ1-1);<span class="keyword">end</span> |
---|
| 133 | 0064 <span class="keyword">if</span> separ2>=separ1+1,num1=RootFile(separ1+1:separ2-1);<span class="keyword">end</span> |
---|
| 134 | 0065 <span class="keyword">if</span> separ3>=separ2+1,num2=RootFile(separ2+1:separ3-1);<span class="keyword">end</span> |
---|
| 135 | 0066 <span class="keyword">if</span> indcur>=separ3+1,num3=RootFile(separ3+1:indcur);<span class="keyword">end</span> |
---|
| 136 | 0067 last_str=RootFile(indcur);<span class="comment">%last character in fileraw</span> |
---|
| 137 | 0068 last=double(last_str);<span class="comment">%corresponding ascii code</span> |
---|
| 138 | 0069 penult=double(RootFile(indcur-1));<span class="comment">%ascii code of the penultimate character</span> |
---|
| 139 | 0070 testsub=0; <span class="comment">%default</span> |
---|
| 140 | 0071 <span class="keyword">if</span> strcmpi(ext,<span class="string">'.avi'</span>) |
---|
| 141 | 0072 nom_type=<span class="string">'*'</span>; |
---|
| 142 | 0073 <span class="comment">%case of old image nomenclature</span> |
---|
| 143 | 0074 <span class="keyword">elseif</span> (strcmp(ext,<span class="string">'.png'</span>) || strcmp(ext,<span class="string">''</span>)) && penult >= 48 && penult <= 57 && (last < 48 || last > 57) |
---|
| 144 | 0075 <span class="comment">% if the penultimate character is a number and the last a letter</span> |
---|
| 145 | 0076 <span class="comment">% search the appendix a,b,c,</span> |
---|
| 146 | 0077 str_a=last_str; <span class="comment">%put appendix a,b,c....</span> |
---|
| 147 | 0078 indcur=indcur-1; |
---|
| 148 | 0079 <span class="keyword">if</span> strcmp(ext,<span class="string">'.png'</span>), nom_type=<span class="string">'#a'</span>; <span class="keyword">end</span> |
---|
| 149 | 0080 <span class="keyword">if</span> strcmp(ext,<span class="string">''</span>), nom_type=<span class="string">'raw_SMD'</span>; <span class="keyword">end</span> |
---|
| 150 | 0081 num=1;count=0; <span class="comment">% extract the numerical appendix</span> |
---|
| 151 | 0082 <span class="keyword">while</span> num==1; |
---|
| 152 | 0083 filascii=double(RootFile(indcur)); |
---|
| 153 | 0084 <span class="keyword">if</span> (48>filascii)||(filascii>57); <span class="comment">% select the non-numerical characters</span> |
---|
| 154 | 0085 num=0; |
---|
| 155 | 0086 <span class="keyword">else</span> |
---|
| 156 | 0087 indcur=indcur-1; count=count+1; |
---|
| 157 | 0088 <span class="keyword">end</span> |
---|
| 158 | 0089 <span class="keyword">end</span> |
---|
| 159 | 0090 <span class="keyword">if</span> count~=0 |
---|
| 160 | 0091 field_count=RootFile(indcur+1:indcur+count);<span class="comment">% set the selected field number</span> |
---|
| 161 | 0092 <span class="keyword">end</span> |
---|
| 162 | 0093 <span class="keyword">elseif</span> penult >= 48 && penult <= 57 && (last <= 66 && last >= 65)<span class="comment">% PCO camera Toulouse, end with A or B (NEW)</span> |
---|
| 163 | 0094 <span class="comment">% if the penultimate character is a number and the last a letter</span> |
---|
| 164 | 0095 <span class="comment">% search the appendix a,b,c,</span> |
---|
| 165 | 0096 str_a=last_str; <span class="comment">%put appendix a,b,c....</span> |
---|
| 166 | 0097 indcur=indcur-1; |
---|
| 167 | 0098 nom_type=<span class="string">'#A'</span>; |
---|
| 168 | 0099 num=1;count=0; <span class="comment">% extract the numerical appendix</span> |
---|
| 169 | 0100 <span class="keyword">while</span> num==1; |
---|
| 170 | 0101 filascii=double(RootFile(indcur)); |
---|
| 171 | 0102 <span class="keyword">if</span> (48>filascii)||(filascii>57); <span class="comment">% select the non-numerical characters</span> |
---|
| 172 | 0103 num=0; |
---|
| 173 | 0104 <span class="keyword">else</span> |
---|
| 174 | 0105 indcur=indcur-1; count=count+1; |
---|
| 175 | 0106 <span class="keyword">end</span> |
---|
| 176 | 0107 <span class="keyword">end</span> |
---|
| 177 | 0108 <span class="keyword">if</span> count~=0 |
---|
| 178 | 0109 field_count=RootFile(indcur+1:indcur+count);<span class="comment">% set the selected field number</span> |
---|
| 179 | 0110 <span class="keyword">end</span> |
---|
| 180 | 0111 indcur=indcur-1; |
---|
| 181 | 0112 <span class="keyword">elseif</span> strcmp(filelit(end-2:end),<span class="string">'-_-_'</span>)<span class="comment">%new nomenclature appendix num1-num2_num_a-num_b</span> |
---|
| 182 | 0113 field_count=num0; |
---|
| 183 | 0114 str2=num1; |
---|
| 184 | 0115 str_a=num2; |
---|
| 185 | 0116 str_b=num3; |
---|
| 186 | 0117 nom_type=<span class="string">'_i1-i2_j1-j2'</span>; |
---|
| 187 | 0118 testsub=1; |
---|
| 188 | 0119 indcur=separ0-1; |
---|
| 189 | 0120 <span class="keyword">elseif</span> strcmp(filelit(end-2:end),<span class="string">'_-_'</span>)<span class="comment">%new nomenclature appendix num1-num2_num_a</span> |
---|
| 190 | 0121 field_count=num1; |
---|
| 191 | 0122 str2=num2; |
---|
| 192 | 0123 str_a=num3; |
---|
| 193 | 0124 nom_type=<span class="string">'_i1-i2_j'</span>; |
---|
| 194 | 0125 testsub=1; |
---|
| 195 | 0126 indcur=separ1-1; |
---|
| 196 | 0127 <span class="keyword">elseif</span> strcmp(filelit(end-2:end),<span class="string">'__-'</span>)<span class="comment">%new nomenclature appendix num1_num2-num2</span> |
---|
| 197 | 0128 indcur=separ1-1; |
---|
| 198 | 0129 field_count=num1; |
---|
| 199 | 0130 str_a=num2; |
---|
| 200 | 0131 str_b=num3; |
---|
| 201 | 0132 nom_type=<span class="string">'_i_j1-j2'</span>; |
---|
| 202 | 0133 testsub=1; |
---|
| 203 | 0134 <span class="keyword">elseif</span> strcmp(filelit(end-1:end),<span class="string">'_-'</span>) |
---|
| 204 | 0135 indcur=separ2-1; |
---|
| 205 | 0136 field_count=num2; |
---|
| 206 | 0137 str2=num3; |
---|
| 207 | 0138 str_a=<span class="string">''</span>; |
---|
| 208 | 0139 nom_type=<span class="string">'_i1-i2'</span>; |
---|
| 209 | 0140 testsub=1; |
---|
| 210 | 0141 <span class="keyword">elseif</span> strcmp(filelit(end-1:end),<span class="string">'__'</span>) |
---|
| 211 | 0142 indcur=separ2-1; |
---|
| 212 | 0143 field_count=num2; |
---|
| 213 | 0144 str2=<span class="string">''</span>; |
---|
| 214 | 0145 str_a=num3; |
---|
| 215 | 0146 nom_type=<span class="string">'_i_j'</span>; |
---|
| 216 | 0147 <span class="keyword">elseif</span> strcmp(filelit(end),<span class="string">'_'</span>) |
---|
| 217 | 0148 indcur=separ3-1; |
---|
| 218 | 0149 <span class="comment">% field_count=num3;</span> |
---|
| 219 | 0150 str2=<span class="string">''</span>; |
---|
| 220 | 0151 str_a=<span class="string">''</span>; |
---|
| 221 | 0152 <span class="comment">%detect zeros before the number</span> |
---|
| 222 | 0153 <span class="comment">% count=0; % extract the numerical appendix</span> |
---|
| 223 | 0154 <span class="keyword">if</span> strcmp(<span class="string">'0'</span>,RootFile(separ3+1)); <span class="comment">% select the non-numerical characters</span> |
---|
| 224 | 0155 nom_type=[<span class="string">'_%0'</span> num2str(length(RootFile(separ3+1:end))) <span class="string">'d'</span>]; |
---|
| 225 | 0156 <span class="keyword">else</span> |
---|
| 226 | 0157 nom_type=<span class="string">'_i'</span>; |
---|
| 227 | 0158 <span class="keyword">end</span> |
---|
| 228 | 0159 field_count=RootFile(separ3+1:end);<span class="comment">% set the selected field number'%03d'</span> |
---|
| 229 | 0160 <span class="keyword">elseif</span> RootFile(indcur-2)==<span class="string">'_'</span><span class="comment">% search appendix a,b,c,d</span> |
---|
| 230 | 0161 last=RootFile(indcur-1:indcur); |
---|
| 231 | 0162 <span class="keyword">if</span> isequal(length(last),2) && double(last(1)) >= 97 && double(last(1)) <= 122 <span class="keyword">...</span><span class="comment">% = 1 for letters</span> |
---|
| 232 | 0163 && double(last(2)) >= 97 && double(last(2)) <= 122 |
---|
| 233 | 0164 str_a=last(1);<span class="comment">%put appendix a,b,c, ou d</span> |
---|
| 234 | 0165 str_b=last(2);<span class="comment">%put appendix a,b,c, ou d</span> |
---|
| 235 | 0166 <span class="comment">% indcur=indcur-3;</span> |
---|
| 236 | 0167 separ0=indsel(end-3); |
---|
| 237 | 0168 num0=RootFile(separ0+1:separ1-1); |
---|
| 238 | 0169 field_count=num0; |
---|
| 239 | 0170 indcur=separ0; |
---|
| 240 | 0171 nom_type=<span class="string">'#_ab'</span>; |
---|
| 241 | 0172 testsub=1; |
---|
| 242 | 0173 <span class="keyword">end</span> |
---|
| 243 | 0174 <span class="comment">%search for other names with counter</span> |
---|
| 244 | 0175 <span class="keyword">else</span> |
---|
| 245 | 0176 <span class="keyword">if</span> length(ext)>1 |
---|
| 246 | 0177 num=1;count=0; <span class="comment">% extract the numerical appendix</span> |
---|
| 247 | 0178 <span class="keyword">while</span> num==1; |
---|
| 248 | 0179 filascii=double(RootFile(indcur)); |
---|
| 249 | 0180 <span class="keyword">if</span> (48>filascii)||(filascii>57); <span class="comment">% select the non-numerical characters</span> |
---|
| 250 | 0181 num=0; |
---|
| 251 | 0182 <span class="keyword">else</span> |
---|
| 252 | 0183 indcur=indcur-1; count=count+1; |
---|
| 253 | 0184 <span class="keyword">end</span> |
---|
| 254 | 0185 <span class="keyword">end</span> |
---|
| 255 | 0186 <span class="keyword">if</span> count~=0 |
---|
| 256 | 0187 field_count=RootFile(indcur+1:indcur+count);<span class="comment">% set the selected field number'%03d'</span> |
---|
| 257 | 0188 <span class="keyword">if</span> isequal(field_count(1),<span class="string">'0'</span>) |
---|
| 258 | 0189 nbfigures=length(field_count); |
---|
| 259 | 0190 nom_type=[<span class="string">'%0'</span> num2str(nbfigures) <span class="string">'d'</span>]; |
---|
| 260 | 0191 <span class="keyword">else</span> |
---|
| 261 | 0192 nom_type=<span class="string">'#'</span>; |
---|
| 262 | 0193 <span class="keyword">end</span> |
---|
| 263 | 0194 <span class="keyword">end</span> |
---|
| 264 | 0195 <span class="keyword">end</span> |
---|
| 265 | 0196 <span class="keyword">end</span> |
---|
| 266 | 0197 <span class="comment">%select the root name in the file_input window</span> |
---|
| 267 | 0198 RootFile=RootFile(1:indcur); |
---|
| 268 | 0199 <span class="keyword">if</span> nbchar<4<span class="comment">% put '*' before the name (remove at the end)</span> |
---|
| 269 | 0200 RootFile(1:4-nbchar)=[]; |
---|
| 270 | 0201 <span class="keyword">end</span> |
---|
| 271 | 0202 <span class="keyword">if</span> testsub |
---|
| 272 | 0203 [RootPath,subdir,extdir]=fileparts(RootPath); |
---|
| 273 | 0204 subdir=[subdir extdir]; |
---|
| 274 | 0205 <span class="keyword">end</span></pre></div> |
---|
| 275 | <hr><address>Generated on Fri 13-Nov-2009 11:17:03 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
| 276 | </body> |
---|
| 277 | </html> |
---|