Next: , Previous: , Up: Directory Index   [Contents][Index]


2.2 command-line

Function File: fevalstruct ( name, argstruct )
Function File: fevalstruct ( …, property, value, … )

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.

Examples

args = struct;
args.real_strictpos_scalar = 1.23;
args.integer_vector = [-5, 3];
args.string = "Hi";
args.cell = {1, 9};
fevalstruct(@__test_parseOptions__, args);
Function File: parseOptions ( opts, optspec, optspec, … )
Function File: paropts = parseOptions ( … )
Function File: [ •, paropts ] = parseOptions ( … )

Kitchen-sink options parser.

Arguments

opts

function options

optspec

option specification, one of:

required option

{name, types}

optional option

{name, types, defvalue}

where:

name

name of option variable

types

datatype specification of option: ’type,type,…’

defvalue

default value given to <name>

paropts

struct of parsed function options (optional)

Notes

Examples

See the tutorial on parseOptions().

Function File: writeCommandLineToFile ( filename, params, scriptname )

write an octapps_run commandline as an output file header ’params’ should be prepared by parseOptions() before

Note

use save("-append",...) later on to not overwrite this header

Examples

args = struct;
args.real_strictpos_scalar = 1.23;
args.integer_vector = [-5, 3];
args.string = "Hi";
writeCommandLineToFile(tempname(tempdir), args, "__test_parseOptions__")

Next: , Previous: , Up: Directory Index   [Contents][Index]