ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Functions for accessing MATLAB
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Deletes a variable from the MATLAB session.
Example
tParamètre is array of 1 real = [4]
tRésultat is array of 1 by 1 real = [[123]]

IF NOT mlSetVariable(gnIdSession, "i", tParamètre) THEN
	Error("Echec d'écriture de la variable")
	RETURN
END

sCodeAExécuter is string = "maRac = sqrt(i)"
SAI_Résultat = mlExecute(gnIdSession, sCodeAExécuter)

tRésultat = mlGetVariable(gnIdSession, "maRac")
IF ErrorOccurred THEN
	Trace("Erreur : " + ErrorInfo())
END

Trace("Racine = " + tRésultat[1,1])

Trace("Liste des variables avant suppression : " + mlListVariable(gnIdSession))

mlDeleteVariable(gnIdSession, "i")
mlDeleteVariable(gnIdSession, "maRac")

Trace("Liste des variables après suppression : " + mlListVariable(gnIdSession))
Syntax
<Result> = mlDeleteVariable(<Session identifier> , <Variable name>)
<Result>: Boolean
  • True if the variable was deleted.
  • False otherwise. To get more details on 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: wd300com.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help