MATLAB Function Reference    
prefdir

Return directory containing preferences, history, and .ini files

Syntax

Description

prefdir returns the directory that contains preferences for MATLAB and related products (matlab.prf), the command history (history.m), and the MATLAB initialization file (MATLAB.ini).

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

See Also

Setting Preferences" in the MATLAB Development Environment documentation


  ppval primes