PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
mlSaveWorkspace (Function)
In french: mlSauveEspaceDeTravail
Saves the session workspace in a MATLAB file.
Versions 24 and later
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
New in version 24
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
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 the backup was successful.
  • False otherwise (if no variable is defined in the session for example). To find out the error details, use ErrorInfo associated with the errMessage constant.
<Session identifier>: Integer
Identifier of MATLAB session. This identifier is returned by mlInitialize.
<File name>: Character string (with quotes)
Path and name of the Mat-File file to use.
Component : wd240com.dll
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment