MLClose

Syntax

MLClose()
MLClose
out = MLClose()

Description

MLClose() ends the MATLAB® process, deletes all variables from the MATLAB workspace, and tells the Microsoft® Excel® software that the MATLAB software is no longer running. Use this syntax when working directly in a worksheet.

MLClose ends the MATLAB process, deletes all variables from the MATLAB workspace, and tells the Microsoft Excel software that the MATLAB software is no longer running. Use this syntax in a VBA macro.

out = MLClose() lets you catch errors when executing MLClose in a VBA macro. If MLClose fails, then out is a string containing error code. Otherwise, out is 0.

Output Arguments

out

0 if the command succeeded. Otherwise, a string containing error code.

Examples

expand all

End the MATLAB Session

End the MATLAB session from a worksheet:

MLClose()

More About

expand all

Tips

  • If you use MLClose when no MATLAB process is running, nothing happens.

See Also

|

Was this topic helpful?