hasTemporaryValue
Tests whether a setting has a temporary value.
Category: Environment and Settings > System Commands
Syntax
tf = hasTemporaryValue(S)
Returns true when the temporary 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. hasTemporaryValue 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 temporary value is set.
Example
Query the temporary layer
s = settings;
g = addGroup(s, 'demo');
a = addSetting(g, 'Level');
disp(hasTemporaryValue(a))
a.TemporaryValue = 5;
disp(hasTemporaryValue(a))
removeGroup(s, 'demo');
Output
0
1