Determine if settings group exists
Check whether a settings group exists before adding it.
settings function to access the root of the
settings tree and then create the settings group
s = settings; addGroup(s,'mysettings');
Check whether a settings group called
exists before adding it to
if hasGroup(s.mysettings,'myothersettings') == 0 addGroup(s.mysettings,'myothersettings'); end s.mysettings
ans = SettingsGroup 'mysettings' with properties: myothersettings: [1×1 SettingsGroup]
parentgroup— Parent settings group
Parent settings group, specified as a
object. Use the
settings function to access the root settings group object
and all the available settings groups.
name— Name of settings group to check for
Name of the settings group to check for, specified as a character vector or string scalar.