External Interfaces Reference |
Get character array from server
MATLAB Client
string = invoke(h, 'GetCharArray
', 'varname', 'workspace
')
Method Signature
Visual Basic Client
Description
GetCharArray
gets the character array stored in the variable varname
from the specified workspace
of the server attached to handle h
and returns it in string
. The workspace
argument can be either base
or global
.
Remarks
If you want output from GetCharArray
to be displayed at the client window, you must specify an output variable (e.g., string
).
Server function names, like GetCharArray
, are case sensitive when using the first syntax shown.
There is no difference in the operation of the three syntaxes shown above for the MATLAB client.
Examples
Assign a string to variable str
in the base workspace of the server using PutCharArray
. Read it back in the client with GetCharArray
.
MATLAB Client
h = actxserver('matlab.application'); h.PutCharArray('str', 'base', ... 'He jests at scars that never felt a wound.'); S = h.GetCharArray('str', 'base') S = He jests at scars that never felt a wound.
Visual Basic Client
Dim Matlab As Object Dim S As String Matlab = CreateObject("matlab.application") Matlab.PutCharArray("str", "base", "He jests at scars that never felt a wound.") S = Matlab.GetCharArray("str", "base")
See Also
PutCharArray
, GetWorkspaceData
, PutWorkspaceData
, GetVariable
, Execute
Feval | GetFullMatrix |
© 1994-2005 The MathWorks, Inc.