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
mlSaveWorkspace (Function)
In french: mlSauveEspaceDeTravail
Saves the session workspace in a MATLAB file.
Example
gnSessionID is int = mlInitialize()
IF ErrorOccurred THEN
ErrorInfo(errFullDetails)
RETURN
END
 
sWorkspaceName is string = "TestWorkS.mat"
sVariableName, sListVariables is string
 
mlExecute(gnSessionID, "myVar = 1")
Trace("1 - Variables: " + mlListVariable(gnSessionID))
mlSaveWorkspace(gnSessionID, sWorkspaceName)
 
mlResetWorkspace(gnSessionID)
Trace("2 - Variables: " + mlListVariable(gnSessionID))
mlExecute(gnSessionID, "myErasedVar = 2")
mlLoadWorkspace(nSessionID, sWorkspaceName, False)
sListVariables = mlListVariable(gnSessionID)
Trace("3 - Variables: " + sListVariables)
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 the details of 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: 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