User`s manual

7 ActiveX and DDE Support
7-18
This method retrieves a full, one- or two-dimensional real or imaginary
mxArray from the named workspace. The real and (optional) imaginary parts
are retrieved into separate arrays of doubles.
Name. Identifies the name of the mxArray to be retrieved.
Workspace. Identifies the workspace that contains the mxArray. Use the
workspace name “base” to retrieve an
mxArray from the default MATLAB
workspace. Use the workspace name “global” to put the
mxArray into the global
MATLAB workspace. The “caller” workspace does not have any context in the
API when used outside of MEX-files.
pr. Array of reals that is dimensioned to be the same size as the mxArray being
retrieved. On return, this array will contain the real values of the
mxArray.
pi. Array of reals that is dimensioned to be the same size as the mxArray being
retrieved. On return, this array will contain the imaginary values of the
mxArray. If the requested mxArray is not complex, an empty array must be
passed. In Visual Basic, an empty array is declared as
Dim Mempty() as Double. A Visual Basic example of this method is
Dim MatLab As Object
Dim Result As String
Dim MReal(1, 3) As Double
Dim MImag() As Double
Dim RealValue As Double
Dim i, j As Integer
rem We assume that the connection to MATLAB exists.
Result = MatLab.Execute("a = [1 2 3 4; 5 6 7 8;]")
Call MatLab.GetFullMatrix("a", "base", MReal, MImag)
For i = 0 To 1
For j = 0 To 3
RealValue = MReal(i, j)
Next j
Next i