clearPersonalValue

Removes the personal value of a setting.

Category: Environment and Settings > System Commands

Syntax

clearPersonalValue(S)

Clears the personal layer of setting S; the other layers are kept.

Description

A setting keeps separate layers of value, and S.ActiveValue returns the first one set in the order temporary, personal, installation, factory. clearPersonalValue empties only the personal layer, so afterwards hasPersonalValue(S) is false and ActiveValue falls back to the next layer. If no layer is left, reading ActiveValue is an error.

Input arguments

S
A matlab.settings.Setting object.

Example

Clear the personal value

s = settings;
g = addGroup(s, 'demo');
a = addSetting(g, 'Level');
a.PersonalValue = 5;
disp(hasPersonalValue(a))
clearPersonalValue(a);
disp(hasPersonalValue(a))
removeGroup(s, 'demo');
Output
   1
   0

Notes

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

See also

hasPersonalValue clearTemporaryValue addSetting settings