finish
User-defined termination script for MATLAB
Syntax
Description
finish
executes user-specified commands when exiting.
MATLAB® executes any file on the search path named finish
that has an executable file extension. Examples of an executable file extension are
.m
, .mlx
, .p
, and
.mlapp
. MATLAB calls finish
, if defined, whenever you do one of
the following.
Click the close button on the MATLAB desktop on Microsoft® Windows® platforms or the equivalent on UNIX® platforms.
Type
quit
orexit
at the command prompt.
If an error occurs in the finish script, then quit
is
canceled so that you can correct your finish file without losing your
workspace.
Examples
Tips
Version History
Introduced before R2006a