removeSetting - Remove setting - MATLAB (original) (raw)

Main Content

Syntax

Description

removeSetting([parentgroup](#mw%5F1dc111bd-3514-413f-b398-2ba29bcf3281),[name](#mw%5F72ff7663-e457-4321-8413-61eb91bbc923)) removes a setting called name from the specified parent settings group.

example

Examples

collapse all

Create a settings group and add a new setting to the group. Then, remove the setting.

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

s = settings; addGroup(s,'mysettings');

Add the setting MyWorkAddress tomysettings.

addSetting(s.mysettings,'MyWorkAddress','PersonalValue','3 Apple Hill Drive'); s.mysettings.MyWorkAddress

ans = Setting 'mysettings.MyWorkAddress' with properties: ActiveValue: '3 Apple Hill Drive' TemporaryValue: PersonalValue: '3 Apple Hill Drive' FactoryValue:

Remove the setting MyWorkAddress frommysettings.

removeSetting(s.mysettings,'MyWorkAddress'); s.mysettings

ans = SettingsGroup 'mysettings' with no properties.

Input Arguments

collapse all

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

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

Version History

Introduced in R2019b