settings

Returns the root of the settings tree.

Category: Environment and Settings > System Commands

Syntax

s = settings

Returns the root SettingsGroup, from which groups are reached by dot syntax.

Description

Settings store options for the application and for your own code in a tree of groups and settings. s.matlab is the product group; s.matlab.fonts and similar nested groups hold individual settings. Add your own branch with addGroup, and populate it with addSetting.

The root itself only holds groups; settings must live inside a group.

Output arguments

s
A matlab.settings.SettingsGroup object for the root of the tree.

Example

Look at the root

s = settings;
disp(class(s))
disp(hasGroup(s, 'matlab'))
s
Output
matlab.settings.SettingsGroup
   1
s = 
  SettingsGroup with properties:

    matlab: [1×1 SettingsGroup]
       myg: [1×1 SettingsGroup]

Notes

In MatLivre, personal values last for the current session only; they are not saved between runs as MATLAB saves them.

See also

addGroup addSetting hasGroup SettingsGroup