finish
User-defined termination script forMATLAB
Syntax
Description
finish
executes user-specified commands when exiting. MATLAB®calls thefinish.m
script, if defined, whenever you do one of the following.
单击关闭按钮
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 thefinish
script, thenquit
is canceled so that you can correct yourfinish.m
file without losing your workspace.
Examples
Tips
Introduced before R2006a