|
|
|
|
mlSaveWorkspace (Function) In french: mlSauveEspaceDeTravail Saves the session workspace in a MATLAB file. 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|