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
mlSaveWorkspace (Function)
In french: mlSauveEspaceDeTravail
Saves the session workspace in a MATLAB file.
Example
gnIdSession is int = mlInitialize()
IF ErrorOccurred THEN
	ErrorInfo(errFullDetails)
	RETURN
END

sNomEspace is string = "EspTest.mat"
sNomVariable, sListeVariables is string

mlExecute(gnIdSession, "maVar = 1")
Trace("1 - Variables : " + mlListVariable(gnIdSession))
mlSaveWorkspace(gnIdSession, sNomEspace)

mlResetWorkspace(gnIdSession)
Trace("2 - Variables : " + mlListVariable(gnIdSession))
mlExecute(gnIdSession, "maVarEffacee = 2")
mlLoadWorkspace(gnIdSession, sNomEspace, False)
sListeVariables = mlListVariable(gnIdSession)
Trace("3 - Variables : " + sListeVariables)
Syntax
<Result> = mlSaveWorkspace(<Session identifier> , <File name>)
<Result>: Boolean
  • True if saved successfully.
  • False otherwise (if no variable is defined in the session for example). 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.
<File name>: Character string
Path and name of the Mat-File file to use.
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