rmpref
Removes a preference, or a whole preference group.
Category: Environment and Settings > System Commands
Syntax
rmpref(group)
Deletes the group and all its preferences.
rmpref(group, pref)
Deletes only the preference pref.
rmpref(group, {pref1, pref2})
Deletes several preferences.
Description
The group and each named preference must exist, otherwise rmpref errors; check with ispref first when needed. Removing the last preference does not remove the group itself.
Input arguments
group- Group name.
pref- Preference name or cell array of names.
Example
Remove one, then the group
setpref('demoapp', 'a', 1);
setpref('demoapp', 'b', 2);
rmpref('demoapp', 'a');
disp(ispref('demoapp', {'a', 'b'}))
rmpref('demoapp');
disp(ispref('demoapp'))
Output
0 1
0