Code covered by the BSD License  

Highlights from
PIVMat 3.02

image thumbnail

PIVMat 3.02


Frederic Moisy (view profile)


27 Apr 2006 (Updated )

A PIV Post-processing and data analysis toolbox

getvar (PIVMat Toolbox)
getvar (PIVMat Toolbox)
PIVMat Function Reference<< Prev | Next >> 
Get the value of the parameters in a string 'p1=v1_p2=v2_...'

S = getvar(STR), where the string STR is in the form 'p1=v1_p2=v2_...', 
returns a structure S containing the variables built from STR, with 
S.p1=v1, S.p2=v2, etc.  If the substrings separated by '_' do 
not contain any '=', the first block of alphanumeric characters stand 
for the variable name, and the remaining of the substring is the value 
for that variable. If the substrings consist only of alphanumerics or 
digits, then a generic variable name in the form 'varxx' is generated. 
This function is useful to read the parameters stored into filenames. 
        var1: 50211 
        var2: 180 
          dt: 18.5000 
          h0: 80 
        mode: 'drop' 
If STR is a cell array of string, getvar loops over each element and 
returns a cell array of structures. 
VAR = getvar(STR, VARNAME) returns the value of the variable VARNAME. 
VAR = getvar(STR, N) returns the Nth variable. 
The variables are converted to numeric whenever a numeric conversion 
is possible. To keep all variables as strings, specify 'strings' as the 
3rd parameter: getvar(STR, VARNAME, 'strings'). (use VARNAME=[] if you 
do not specify any VARNAME). 
See Also
getattribute, getfilenum. 
Published output in the Help browser 
   showdemo getvar 

 Previous: getsetnameNext: gradientf 

2005-2013 PIVMat Toolbox 3.02

Contact us