The Matlab module allows you to use the Matlab Engine to extend the capabilities of SWIP5. You can create your own scripts that behave like SWIP5 plug-ins, including extending the program menu, and can be called from the SWIP5 menu.

The current plugin works only with Matlab 2015b (32 bits). You must install this version of the program and have a license for Matlab in this version.

The SWIP5 program does not have the Matlab Engine turned on when it is launched. To perform any operations in Matlab, you mast start Matlab Engine with FileMatlabOpen Matlab command. Starting Matlab Engine may take a while. After proper launch, a window appears (Fig. 32) and at the same time a window with Matlab command lines opens (Fig. 33). Most Matlab commands can be executed there, although the editing possibilities are smaller than with a standard Matlab environment. Access paths are also set differently and for some functions, it must be set (see example script 2 in the section Configuring data transfer to Matlab).

Fig. 32  Matlab

Fig. 33  Command line of the Matlab program

Without running the Matlab Engine, you can save the QuakeML development to a file in the Matlab format with the command  FileMatlabSave QuakeML to Matlab file. The module then writes the entire QuakeML structure to the Matlab structure, and if QuakeML optional values exist (i.e. marked [0..1]), it creates the appropriate structure fields, and if there are no optional values, the structure does not contain these fields.

Any messages and comments from Matlab created during the script work are displayed in the report window after the plugin is finished.

  • No labels