hasPersonalValue
Tests whether a setting has a personal value.
Category: Environment and Settings > System Commands
Syntax
tf = hasPersonalValue(S)
Returns true when the personal layer of setting S holds a value.
Description
A setting can hold a temporary, personal, installation and factory value at the same time, and ActiveValue shows the first one set in that order. hasPersonalValue looks at one layer only, so it tells whether that layer would take part in the lookup.
Input arguments
S- A
matlab.settings.Settingobject.
Output arguments
tf- Logical scalar:
trueif the personal value is set.
Example
Query the personal layer
s = settings;
g = addGroup(s, 'demo');
a = addSetting(g, 'Level');
disp(hasPersonalValue(a))
a.PersonalValue = 5;
disp(hasPersonalValue(a))
removeGroup(s, 'demo');
Output
0
1
Notes
In MatLivre, personal values last for the current session only; they are not saved between runs as MATLAB saves them.