MATLAB Function Reference |
Return directory containing preferences, history, and layout files
Syntax
Description
prefdir
returns the directory that contains preferences for MATLAB and related products (matlab.prf
), the command history file (history.m
), the MATLAB shortcuts (shortcuts.xml
), and the MATLAB desktop layout files (MATLABDesktop.xml
and Your_Saved_LayoutMATLABLayout.xml
).
On Macintosh platforms, the directory might be in a hidden folder, for example, myname/.matlab/R14
. To access the directory, select Go -> Go to Folder in the Finder. In the resulting dialog box, type the path returned by prefdir
and press Enter.
d = prefdir
returns the name of the directory containing preferences and related files, but does not ensure its existence.
d = prefdir(
creates a directory for preferences and related files if one does not exist.1
)
Examples
Running dir
for the directory shows
and possibly other files for other MathWorks products and any desktop layouts you saved.
See Also
Fonts, Colors, and Other Preferences topic in the MATLAB Desktop Tools and Development Environment documentation
ppval | preferences |
© 1994-2005 The MathWorks, Inc.