MATLAB Function Reference Previous page   Next Page
addpref

Add preference

Syntax

Description

addpref('group','pref',val) creates the preference specified by group and pref and sets its value to val. It is an error to add a preference that already exists.

group labels a related collection of preferences. You can choose any name that is a legal variable name, and is descriptive enough to be unique, e.g. 'ApplicationOnePrefs'. The input argument pref identifies an individual preference in that group, and must be a legal variable name.

addpref('group',{'pref1','pref2',...'prefn'},{val1,val2,...valn}) creates the preferences specified by the cell array of names 'pref1', 'pref2',...,'prefn', setting each to the corresponding value.

Examples

This example adds a preference called version to the mytoolbox group of preferences and sets its value to the string 1.0.

See Also

getpref, ispref, rmpref, setpref, uigetpref, uisetpref


Previous page  addpath addtodate Next page

© 1994-2005 The MathWorks, Inc.