BayES BayES

3.7 Interface to MATLAB®

MATLAB is a proprietary software platform designed for solving engineering and scientific problems. Although it provides some toolboxes that facilitate statistical analysis, in general, and econometric modeling, in particular (mostly time-series models), MATLAB is primarily known for its extensive and easy to use language. This is largely a matrix-based language, specifically designed for solving computational problems.

BayESmatlab() function provides a convenient interface to MATLAB, which allows the user to:

The general syntax of the matlab() function is the following:9

[<structure name> = ] matlab( <MATLAB .m file> 
        [, "data"=<list of matrices/datasets to pass to MATLAB> ] 
        [, "return"=<list of matrices to retrieve from MATLAB> ] 
        [, "options"=<string of options when starting MATLAB> ] 
        );

where:

As the matlab() function executes with the above options, MATLAB 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 MATLAB and the commands contained in the MATLAB .m file provided to matlab().

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

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

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