This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

prefdir

Folder containing preferences, settings, history, and layout files

Syntax

folder = prefdir
folder = prefdir(1)

Description

example

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.

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)

Introduced before R2006a