removeGroup

Deletes a settings group and everything inside it.

Category: Environment and Settings > System Commands

Syntax

removeGroup(parent, name)

Removes the child group name from parent.

Description

Removing a group also removes its settings and nested groups. Product groups that ship with the application cannot be removed. Asking for a group that does not exist is an error, so check with hasGroup when unsure.

Input arguments

parent
The root from settings or a SettingsGroup.
name
Name of the child group to delete.

Example

Add and remove

s = settings;
g = addGroup(s, 'tmpgroup');
addSetting(g, 'A', 'PersonalValue', 1);
disp(hasGroup(s, 'tmpgroup'))
removeGroup(s, 'tmpgroup');
disp(hasGroup(s, 'tmpgroup'))
Output
   1
   0

See also

addGroup hasGroup removeSetting settings