|
|
|
|
|
mlListVariable (Function) Lists the variables found in the MATLAB session. gnIdSession is an integer
gnIdSession = mlInitialize()
IF gnIdSession = -1 THEN
Error(ErrorInfo(errFullDetails))
END
sListeVar is TO string = mlListVariable(gnIdSession)
EDT_Result = sVarList
gnIdSession is an integer
gnIdSession = mlInitialize()
IF gnIdSession = -1 THEN
Error(ErrorInfo(errFullDetails))
END
aParameter is array of 1 real = [4]
aResult is array of 1 by 1 real = [[123]]
IF NOT mlSetVariable(gnIdSession, "i", tParameter) THEN
Error("Failure writing the variable")
RETURN
END
sCodeToRun is string = "myRoot = sqrt(i)"
SAI_Result = mlExecute(gnIdSession, sCodeAExecute)
tResult = mlGetVariable(gnIdSession, "maRac")
IF ErrorOccurred THEN
Trace("Error: " + ErrorInfo())
END
Trace("Root = " + aResult[1,1])
Trace("List of variables before deletion: " + mlListVariable(gnIdSession))
mlDeleteVariable(gnIdSession, "i")
mlDeleteVariable(gnIdSession, "maRac")
Trace("List of variables after deletion: " + mlListVariable(gnIdSession))
Sintaxis
<Result> = mlListVariable(<Session identifier>)
<Result>: Character string List of variables found in the MATLAB session. The variables are separated by a CR character (Carriage Return). <Session identifier>: Integer Identifier of MATLAB session. This identifier is returned by mlInitialize.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|