Engine.AutomaticVariable

Engine.AutomaticVariable — automatically maps a MATLAB variable to a Gamma variable.

Syntax

Engine.AutomaticVariable (varname, sym, poll_secs, local_override?=nil)
		

Arguments

varname

The name of the MATLAB variable, as a string.

sym

The Gamma variable, as a symbol.

poll_secs

The number of seconds between polls. This can be fractional, such as 0.1.

local_override

An optional argument with a default value of nil. Possible values are:

    nil - Use MATLAB's value as the initial value and update Gamma.

    t - Use Gamma's value as the initial value and update MATLAB.

    other - Use this value as the initial value and update both Gamma and MATLAB.

Description

This function automatically maps a MATLAB variable to a Gamma variable. MATLAB provides no mechanism for a callback to the DataHub, so the variable must be polled on a regular basis. If either MATLAB or Gamma changes a mapped variable, the other is updated. This function is defined in the MatlabSupport.g file.