| MATLAB® | ![]() |
| On this page… |
|---|
Setting General Preferences for the MATLAB® Application Toolbox Path Caching Preference Figure Window Printing Preference Default Behavior of the Delete Function |
Select File > Preferences > General from any desktop tool to access General Preferences.
These preferences apply to all relevant tools in the MATLAB® application.

For information, see Toolbox Path Caching in the MATLAB® Program.
For information, see Printing and Exporting in MATLAB Graphics documentation.
Files you delete using the delete function are permanently removed by default. There is no opportunity to retrieve them.
You can use this preference to instead move deleted files to the Recycle Bin on Microsoft® Windows®, to the Trash Can on Apple®Macintosh®, or to a tmp directory on The Open Group UNIX® platforms. Then, you can recover any accidentally deleted files from these locations. Deleted files in these locations are not automatically removed; you must remove them using operating system features, such as Empty Recycle Bin on the Windows platform. When you select this preference, delete might run slower.
The delete preference for MATLAB actually sets the state of the recycle function upon startup and when you change the preference. You can override the behavior of the preference by setting the recycle function state. For example, regardless of the preference setting, when you run
recycle('off')
delete('thisfile.m')
MATLAB permanently removes thisfile.m from the current directory. Files you subsequently remove using delete are also permanently removed, unless you reapply the preference to recycle or run recycle('on'). Regardless of the state of the recycle function when you end a session, the next time you start MATLAB, the setting for the preference is honored. For more information, see the recycle and delete reference pages.
Note that this preference and the recycle function do not apply to files you delete using the Current Directory browser. For more information, see Cutting or Deleting Files and Directories.
The MAT-file save format sets the default version compatibility option MATLAB uses when saving MAT-files. Use these options if you use multiple versions of MATLAB or share MAT-files with others who run a different version of MATLAB. The setting applies when you use the save function as well as when you useSave menu items for MAT-files, such as File > Save Workspace As from any desktop tool.
The MAT-file preference also applies to saving FIG-files, which include plots, as well as GUIs you create with GUIDE.

Options are
MATLAB Version 7.3 or later (save -v7.3)—Starting in MATLAB Version 7.3, you can save data that is larger than 2 GB on platforms that allow it, which is the primary purpose of this option. Using this option is equivalent to running save -v7.3. This format of the resulting MAT-file is HDF5-based. You cannot load these MAT-files into any versions prior to MATLAB Version 7.3; in those cases, use one of the other two options.
MATLAB Version 7 or later (save -v7)—Starting in MATLAB Version 7, MATLAB compresses the data when saving a MAT-file, thereby reducing the storage space required. When you load the MAT-file, MATLAB automatically uncompresses the data. In addition, MATLAB uses Unicode® character encoding for strings when you save a MAT-file, making the data accessible to other users of MATLAB, regardless of the default character encoding scheme used by their systems. MAT-files saved with this option work in all MATLAB 7 versions. Using this option is equivalent to running save -v7.
MATLAB Version 5 or later (save -v6)—Releases of MATLAB prior to Version 7 did not save compressed MAT-files. They also did not use Unicode character encoding, which sometimes prevented the exchange of MAT-files among users, particularly when they used localized systems. Specify this option to save MAT-files for use with versions prior to MATLAB Version 7. Using this option is equivalent to running save -v6.
Like other preferences, the MAT-file save format preference gets its initial value from the preference file for the previous installed version. For example, if the setting in your MATLAB 7.5 preference is -v6, when you upgrade from MATLAB Version 7.5 (R2007b) to MATLAB Version 7.6 (R2008a), the initial value in Version 7.6 is -v6.
If you upgrade from a version prior to MATLAB Version 7.3, or if you do not have a previous MATLAB version installed, the initial value is -v7.
Note For more information about MAT-file save formats, including restrictions, see Version Compatibility Options and Remarks in the save reference page. |
You can override the MAT-file save format preference by using the save function with a specified version compatibility option. For occasional use, this might be more convenient than changing the preference. For example, use save with the-v6 option to ensure compatibility with MATLAB versions prior to Version 7. For more information, see the save reference page.
These preferences instruct MATLAB to display or not display specific confirmation dialog boxes.

When the check box for a confirmation dialog is selected and you perform the action it refers to, the confirmation dialog box appears. If you clear that check box, the dialog box does not appear when you perform the action.
When the confirmation dialog box does appear, it includes a Do not show this prompt again check box. If you select the check box in the dialog box, it automatically clears the check box for the confirmation preference.
For example, select the check box Warn before deleting Command History items. Then select Edit > Delete Selection in the Command History, MATLAB displays the following confirmation dialog box.

If you select the Do not show this prompt again check box and click OK, the confirmation dialog box will not appear the next time you delete items from the Command History window. In addition, the Warn before deleting Command History items check box in the Confirmations Dialogs preferences pane is cleared.
The following table summarizes the confirmation dialog boxes.
Confirmation Dialogs Check Box Item | About the Confirmation Dialog Box | For More Information |
|---|---|---|
Warn before deleting Command History items | Appears when you delete entries from the Command History window. | |
Warn before clearing the Command Window | Appears when you clear the Command Window content using menu items. Does not appear when you use the clc function. | |
Prompt when editing files that do not exist | Appears when you type edit filename, if filename does not exist in the current directory or on the search path. | |
Prompt to exit debug mode when saving file | Appears when you try to save a modified file while in debug mode. | |
Prompt to save on activate | Appears when you have unsaved changes to a figure and M-file, and then activate the GUI, by clicking the Run button, for example. | GUIDE Preferences in the GUIDE documentation |
Prompt to save on export | Appears when you have unsaved changes to a figure and M-file, and then select File > Export. | GUIDE Preferences in the GUIDE documentation |
Confirm before exiting MATLAB | Appears when you quit MATLAB. | |
Warn about missing search databases | Appears if you have help files in the Help browser for non-MathWorks products and the search database for those files has not been updated for the version of MATLAB you are running. | Contact the provider of the help files to obtain the correct version of the search database. Without the most current version, you can use the help files in the Help browser, but the Help browser search will not include those files in search results. |
Confirm when deleting variables | Appears when you delete variables from the workspace using menu items. Does not appear with the clear function. |
For information, see Source Control Interface.
If you run MATLAB on a multiple-CPU system (multiprocessor or multicore), you can use multithreaded computation, which can improve performance for some operations. For more information, see Enabling Multithreaded Computation.
![]() | Preferences | Fonts Preferences for Desktop Tools | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |