[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 num2stra</title> |
---|
| 6 | <meta name="keywords" content="num2stra"> |
---|
| 7 | <meta name="description" content="'num2stra': transform number to the corresponding character string depending on the nomenclature"> |
---|
| 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> > num2stra.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>num2stra |
---|
| 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>'num2stra': transform number to the corresponding character string depending on the nomenclature</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 str=num2stra(num,nom_type,index); </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">'num2stra': transform number to the corresponding character string depending on the nomenclature |
---|
| 31 | -------------------------------------------- |
---|
| 32 | function str=num2stra(num,nom_type) |
---|
| 33 | |
---|
| 34 | OUTPUT: |
---|
| 35 | str: character string |
---|
| 36 | |
---|
| 37 | INPUT: |
---|
| 38 | num: input number (file index) |
---|
| 39 | nom_type: nomencalture type (see fct name_generator) |
---|
| 40 | |
---|
| 41 | see also: <a href="stra2num.html" class="code" title="function numres=stra2num(str)">stra2num</a>, <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>, <a href="name2display.html" class="code" title="function [RootPath,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput)">name2display</a></pre></div> |
---|
| 42 | |
---|
| 43 | <!-- crossreference --> |
---|
| 44 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
| 45 | This function calls: |
---|
| 46 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
| 47 | </ul> |
---|
| 48 | This function is called by: |
---|
| 49 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
| 50 | <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="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="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="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> |
---|
| 51 | <!-- crossreference --> |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
| 55 | <div class="fragment"><pre>0001 <span class="comment">%'num2stra': transform number to the corresponding character string depending on the nomenclature</span> |
---|
| 56 | 0002 <span class="comment">%--------------------------------------------</span> |
---|
| 57 | 0003 <span class="comment">% function str=num2stra(num,nom_type)</span> |
---|
| 58 | 0004 <span class="comment">%</span> |
---|
| 59 | 0005 <span class="comment">% OUTPUT:</span> |
---|
| 60 | 0006 <span class="comment">% str: character string</span> |
---|
| 61 | 0007 <span class="comment">%</span> |
---|
| 62 | 0008 <span class="comment">% INPUT:</span> |
---|
| 63 | 0009 <span class="comment">% num: input number (file index)</span> |
---|
| 64 | 0010 <span class="comment">% nom_type: nomencalture type (see fct name_generator)</span> |
---|
| 65 | 0011 <span class="comment">%</span> |
---|
| 66 | 0012 <span class="comment">% see also: stra2num, name_generator, name2display</span> |
---|
| 67 | 0013 |
---|
| 68 | 0014 <a name="_sub0" href="#_subfunctions" class="code">function str=num2stra(num,nom_type,index);</a> |
---|
| 69 | 0015 <span class="keyword">if</span> ~exist(<span class="string">'index'</span>,<span class="string">'var'</span>) |
---|
| 70 | 0016 index=2; <span class="comment">%index 1 or 2 of the file indices</span> |
---|
| 71 | 0017 <span class="keyword">end</span> |
---|
| 72 | 0018 <span class="keyword">switch</span> index |
---|
| 73 | 0019 <span class="keyword">case</span> 1 |
---|
| 74 | 0020 <span class="keyword">if</span> length(nom_type)>=4 && isequal(nom_type(1:2),<span class="string">'%0'</span>) && isequal(nom_type(4),<span class="string">'d'</span>) |
---|
| 75 | 0021 str=num2str(num,nom_type(1:4)); |
---|
| 76 | 0022 <span class="keyword">else</span> |
---|
| 77 | 0023 str=num2str(num); |
---|
| 78 | 0024 <span class="keyword">end</span> |
---|
| 79 | 0025 <span class="keyword">case</span> 2 |
---|
| 80 | 0026 <span class="keyword">if</span> isempty(nom_type) |
---|
| 81 | 0027 nom_type=<span class="string">'none'</span>; |
---|
| 82 | 0028 <span class="keyword">end</span> |
---|
| 83 | 0029 <span class="keyword">if</span> isequal(nom_type,<span class="string">'png_old'</span>) || isequal(nom_type,<span class="string">'netc_old'</span>) || isequal(nom_type,<span class="string">'raw_SMD'</span>)||<span class="keyword">...</span> |
---|
| 84 | 0030 isequal(nom_type(end),<span class="string">'a'</span>)||isequal(nom_type(end),<span class="string">'b'</span>) |
---|
| 85 | 0031 str=char(96+num); |
---|
| 86 | 0032 <span class="keyword">elseif</span> isequal(nom_type(end),<span class="string">'A'</span>)|isequal(nom_type(end),<span class="string">'B'</span>) |
---|
| 87 | 0033 str=char(64+num); |
---|
| 88 | 0034 <span class="keyword">elseif</span> isequal(nom_type,<span class="string">'series_i'</span>)|isequal(nom_type,<span class="string">'netc_series'</span>)<span class="keyword">...</span> |
---|
| 89 | 0035 |isequal(nom_type,<span class="string">'ima_num'</span>)| isequal(nom_type,<span class="string">'avi'</span>)| isequal(nom_type,<span class="string">'none'</span>)<span class="keyword">...</span> |
---|
| 90 | 0036 isequal(nom_type,<span class="string">'_i'</span>)|isequal(nom_type,<span class="string">'_i1-i2'</span>) |
---|
| 91 | 0037 str=<span class="string">''</span>; |
---|
| 92 | 0038 <span class="keyword">else</span> |
---|
| 93 | 0039 str=num2str(num); |
---|
| 94 | 0040 <span class="keyword">end</span> |
---|
| 95 | 0041 <span class="keyword">end</span></pre></div> |
---|
| 96 | <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> |
---|
| 97 | </body> |
---|
| 98 | </html> |
---|