Main Content

prefdir

Folder containing preferences, settings, history, and layout files

Description

folder = prefdir returns the name of the preferences folder. The preferences folder contains preferences and settings for MATLAB® and related products, the command history file, MATLAB favorites files, and MATLAB desktop layout files.

example

folder = prefdir(1) creates a folder for preferences and related files if one does not exist. If the folder does exist, the name is assigned to folder.

Examples

collapse all

prefdir
ans =
    'C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2018b'

Set the current folder to the preferences folder and then view the contents of the folder.

cd(prefdir)
dir
winopen(prefdir)

Extended Capabilities

Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool.

Version History

Introduced before R2006a