Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

collapse all

End the MATLAB session from a worksheet:

MLClose()

More About

collapse all

Tips

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

See Also

|

Introduced before R2006a

Was this topic helpful?