AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones para acceder a MATLAB
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Lists the variables found in the MATLAB session.
Ejemplo
gnIdSession is an integer
gnIdSession = mlInitialize()

IF gnIdSession = -1 THEN
	Error(ErrorInfo(errFullDetails))
END

// Code of BTN_ListVariables button
sListeVar is TO string = mlListVariable(gnIdSession)

EDT_Result = sVarList
gnIdSession is an integer
gnIdSession = mlInitialize()

IF gnIdSession = -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(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.
Componente: wd300com.dll
Versión mínima requerida
  • Versión 20
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local