About the MATLAB Component

You can use the MATLAB component to allow Isight to interact with the MATLAB software package from The MathWorks, Inc. Because this component is interacting directly with a MATLAB engine, anything that you can do in MATLAB you can invoke from Isight using the MATLAB component.

Because the MATLAB component must programmatically interact with the MATLAB software, it is important to make sure your environment is set up properly. You must specify where the MATLAB executable is installed so that, when the MATLAB component runs, it can find the executable and launch it. The steps used to specify the MATLAB location depend on whether you are using the Java Socket or Native Code interface. For more information, see Configuring the Java Socket Environment or Configuring the Native Code Environment.

To use the MATLAB component, you define actions, which can be either commands or mappings (input or output). You then determine when you want the actions to take place (in which “phase”). There are three phases from which to choose:

  • Initialize. The MATLAB component executes the actions only the first time that the component executes within a job.

  • Execution Order. The MATLAB component executes actions every time the MATLAB component executes.

  • Finalize. The MATLAB component executes actions only when the MATLAB session is shutting down.

The standard usage is to define actions in the Execution Order phase. By default, the MATLAB component starts with three predefined actions in the Execution Order phase to represent the most common usage:

  • Input Mappings for defining mappings from Isight parameter values to MATLAB variables.

  • Commands for defining the command to execute.

    Note: Isight attempts to identify variable names in your command script file and can use these names to create potential Isight parameters.To take advantage of this feature, you may want to create all your commands before creating your mappings. See Defining Commands for details.

  • Output Mappings for mapping MATLAB variable values back to Isight parameters.

These default actions are provided for convenience and can be deleted or renamed. They are empty to start with, and the details of each must be completed as needed.

The following figure shows an example of the MATLAB Component Editor with a Mapping action selected:



To start the MATLAB Component Editor, double-click the MATLAB component icon . When you have finished configuring the MATLAB component, click OK to close the editor. For more information about inserting components and accessing component editors, see Working with Components in the Isight User’s Guide.