|
|
|
|
mlDeleteVariable (Function) In french: mlSupprimeVariable Deletes a variable from the MATLAB session. 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> = mlDeleteVariable(<Session identifier> , <Variable name>)
<Result>: Boolean - True if the variable was deleted.
- False otherwise. To get the details of the error, use ErrorInfo with the errMessage constant.
<Session identifier>: Integer Identifier of MATLAB session. This identifier is returned by mlInitialize. <Variable name>: Character string Name of variable to delete.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|