Categories &

Functions List

Function Reference: options

Function File: opt = options ('key1', value1, 'key2', value2, …)

Create options struct opt from a number of key and value pairs. For use with order reduction and system identification functions. Option structs are a way to avoid typing the same key and value pairs over and over again.


key, property

The name of the property.


The value of the property.



Struct with fields for each key.


 octave:1> opt = options ("method", "spa", "tol", 1e-6)
 opt =
   scalar structure containing the fields:
     method = spa
     tol =  1.0000e-06
 octave:2> save filename opt
 octave:3> # save the struct 'opt' to file 'filename' for later use
 octave:4> load filename
 octave:5> # load struct 'opt' from file 'filename'

Source Code: options