ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Functions for accessing MATLAB
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Deletes a variable from the MATLAB session.
Example
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.
Component: wd290com.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help