|
|
|
|
mlListVariable (Function) In french: mlListeVariable Lists the variables found in the MATLAB session. gnSessionID is int gnSessionID = mlInitialize() Â IF gnSessionID = -1 THEN Error(ErrorInfo(errFullDetails)) END Â // Code of BTN_ListVariables button sVarList is string = mlListVariable(gnSessionID) Â EDT_Result = sVarList
gnSessionID is int gnSessionID = mlInitialize() Â IF gnSessionID = -1 THEN Error(ErrorInfo(errFullDetails)) END Â // Code of BTN_Create_Variables button aParameter is array of 1 real = [4] aResult is array of 1 by 1 real = [[123]] Â IF NOT mlSetVariable(gnSessionID, "i", aParameter) THEN Error("Failure writing the variable") RETURN END Â sCodeToRun is string = "myRoot = sqrt(i)" EDT_Result = mlExecute(gnSessionID, sCodeToRun) Â aResult = mlGetVariable(gnSessionID, "myRoot") IF ErrorOccurred THEN Trace("Error: " + ErrorInfo()) END Â Trace("Root = " + aResult[1,1]) Â Trace("List of variables before deletion: " + mlListVariable(gnSessionID)) Â mlDeleteVariable(gnSessionID, "i") mlDeleteVariable(gnSessionID, "myRoot") Â Trace("List of variables after deletion: " + mlListVariable(gnSessionID))
Syntax
<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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|