Next: condor-jobs, Previous: array-handling, Up: Directory Index [Contents][Index]
Evaluate the function named name, using the keyword-value arguments given by argstruct.
If property "stripempty" is true, empty fields are first removed from argstruct.
args = struct; args.real_strictpos_scalar = 1.23; args.integer_vector = [-5, 3]; args.string = "Hi"; args.cell = {1, 9}; fevalstruct(@__test_parseOptions__, args);
Kitchen-sink options parser.
function options
option specification, one of:
{name, types}
{name, types, defvalue}
where:
name of option variable
datatype specification of option: ’type,type,…’
default value given to <name>
struct of parsed function options (optional)
type
in types must correspond to a function
istype()
: each function will be called to check that a value is
valid. For example, if types = ’numeric,scalar’ then a value x
must satisfy isnumeric(x) && isscalar(x)
reg, reg, ..., "key", val, "key", val, ...
where reg are regular options, and key and val are keyword-value option pairs. Regular options are assigned in the order they were given as optspecs; regular options may also be given as keyword-values.
See the tutorial on parseOptions()
.
write an octapps_run commandline as an output file header
’params’ should be prepared by parseOptions()
before
use save("-append",...)
later on to not overwrite this header
args = struct; args.real_strictpos_scalar = 1.23; args.integer_vector = [-5, 3]; args.string = "Hi"; writeCommandLineToFile(tempname(tempdir), args, "__test_parseOptions__")
Next: condor-jobs, Previous: array-handling, Up: Directory Index [Contents][Index]