Main Content

removeGroup

删除设置组

自 R2019b 起

说明

示例

removeGroup(parentgroup,name) 从指定的父设置组中删除名为 name 的设置组。如果 name 包含设置或设置组,removeGroup 也会删除它们。

示例

全部折叠

使用 settings 函数访问设置树的根,然后创建 mysettings 设置组。

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

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

使用 removeGroup 删除 mysettings

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

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

输入参数

全部折叠

要从中删除组的父设置组,指定为 SettingsGroup 对象。使用 settings 函数访问根设置组对象和所有可用设置组。

要删除的设置组的名称,指定为字符向量或字符串标量。如果在指定的设置组中不存在名为 name 的组,MATLAB® 会引发错误。

版本历史记录

在 R2019b 中推出