MATLAB Function Reference Previous page   Next Page
prefdir

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(1) creates a directory for preferences and related files if one does not exist.

Examples

Run

MATLAB returns

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


Previous page  ppval preferences Next page

© 1994-2005 The MathWorks, Inc.