Via Microsoft's component object model (COM), different applications can communicate with each other via interfaces.
In the ScriptingBrainVoyagerQXfromMatlab.pdf guide the procedure is described.This guide is placed in the folder /Program Files/BrainVoyager QX/GettingStartedGuides/ during installation. It can also be downloaded from the wiki at http://wiki.brainvoyager.com/.
For a preview of the Scripting BrainVoyager QX from Matlab guide, please see the section below.
First, enable the COM facility in BrainVoyager QX by opening the DOS shell (in Program Files > Accessories) and typing
BrainVoyagerQX.exe -regserver
in the BrainVoyager QX directory. Type 'cd ..' (change directory) to go to a higher directory and 'cd <name subdirectory>' to go to a subdirectory (see figure below).
BrainVoyager QX can now be started from Matlab via the simple command
bvqx = actxserver(’BrainVoyagerQX.BrainVoyagerQXInterface.1’)
. BrainVoyager QX will fullfil the role of COM-server, where the COM-client Matlab will request its methods via the COM-interface.
The items that are accessible via COM are shown as yellow cubes (objects) in the Matlab Workspace (see image below).
Figure: printing to the BrainVoyager QX Log tab from Matlab
To use the BrainVoyager QX scripting functions in Matlab, the same syntax can be used, except for when a function does not require arguments, the ( ) do not need to be used; for example, to show the log tab, in the BrainVoyager QX Log tab one needs to type ShowLogTab(); while in Matlab this would be ShowLogTab;
Figure: double-click on an object in the workspace to inspect its property.