Main Content

removeGroup

Remove settings group

Since R2019b

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

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

s = settings;
newGroup = addGroup(s,"mysettings");
s
s = 
  SettingsGroup with properties:

    mysettings: [1×1 SettingsGroup]
        mytest: [1×1 SettingsGroup]
        matlab: [1×1 SettingsGroup]

Use removeGroup to remove mysettings.

removeGroup(s,"mysettings");
s
s = 
  SettingsGroup with properties:

    mytest: [1×1 SettingsGroup]
    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.

Version History

Introduced in R2019b