removeGroup

Remove settings group

Description

example

removeGroup(parentgroup,name) removes a settings group called name from the specified parent settings group. If name contains settings or settings groups, removeGroup removes them as well.

Examples

collapse all

Create and then remove a settings group.

Use the settings function to access the root of the settings tree and then create the settings group mysettings.

s = settings;
addGroup(s,'mysettings');
s
s = 
  SettingsGroup with properties:
               mysettings: [1×1 SettingsGroup]
                   matlab: [1×1 SettingsGroup]

Remove the settings group mysettings.

removeGroup(s,'mysettings');
s
s = 
  SettingsGroup with properties:
                   matlab: [1×1 SettingsGroup]

Input Arguments

collapse all

Parent settings group to remove the group from, specified as a SettingsGroup object. Use the settings function to access the root settings group object and all the available settings groups.

Name of the settings group to remove, specified as a character vector or string scalar. If a group called name does not exist in the specified settings group, MATLAB® throws an error.

Introduced in R2019b