External Interfaces Reference Previous page   Next Page
GetVariable

Returns data from variable in server workspace

Syntax

MATLAB Client

Method Signature

Visual Basic Client

Description

GetVariable returns the data stored in the specified variable from the specified workspace of the server. Each syntax in the MATLAB Client section produce the same result. Note that the dot notation (h.GetVariable) is case sensitive.

varname from the specified workspace of the server that is attached to handle h. The workspace argument can be either base or global.

varname -- the name of the variable whose data is returned

workspace -- the workspace containing the variable can be either:

Remarks

You can use GetVariable in place of GetWorkspaceData, GetFullMatrix and GetCharArray to get data stored in workspace variables when you need a result returned explicitly (which might be required by some scripting languages).

Examples

This example assigns a cell array to the variable C1 in the base workspace of the server, and then read it back with GetVariable, assigning it to a new variable C2.

MATLAB Client

Visual Basic Client

The Visual Basic Client example creates a message box displaying the second element in the cell array, which is the string hello.

See Also

GetWorkspaceData, PutWorkspaceData, GetFullMatrix, PutFullMatrix, GetCharArray, PutCharArray, Execute


Previous page  GetFullMatrix GetWorkspaceData Next page

© 1994-2005 The MathWorks, Inc.