3.8 Interface to GNU Octave

GNU Octave is free software designed as a matrix programming language, which is largely compatible with MATLAB. Later versions of GNU Octave feature a simple GUI, but the vast majority of functions can still be accessed only using code. GNU Octave is intended for numerical computations, in general, and graphics, but it can be also used for performing Bayesian inference, especially when using some of its statistics-oriented loadable modules.

BayESoctave() function provides a convenient interface to GNU Octave, which allows the user to:

The general syntax of the octave() function is the following:10

[<structure name> = ] octave( <GNU Octave .m file> 
        [, "data"=<list of matrices/datasets to pass to GNU Octave> ] 
        [, "return"=<list of matrices to retrieve from GNU Octave> ] 


As the octave() function executes, GNU Octave attempts to print output on the system’s command console. BayES grabs this output and redirects it to the BayES main console in real time. This output is entirely determined by GNU Octave and the commands contained in the GNU Octave .m file provided to octave().

The sample script file in "$BayESHOME/Samples/5Interfaces/octave" contains an example of using the octave() function, along with a simple GNU Octave .m file. The GNU Octave interface is also accessible from the BayES main menu via Interfaces GNU Octave.

10Arguments inside square brackets are optional. Optional arguments passed to the octave() function can be provided in any order, but always after the mandatory argument (GNU Octave .m file). Optional arguments always come in pairs (eg. "data"={myDataset,myMatrix}).

Share this content:
Facebook Twitter LinkedIn Email
© 2016–20 Grigorios Emvalomatis