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
quitorexitat the command prompt.
Create a finish.m file in the userpath folder, which is on the
MATLAB search path. Add commands you want executed at exit.
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
