%% Create a Preference Using Specified Default Value

setpref('mytoolbox','version','1.0')
rmpref('mytoolbox','version')
getpref('mytoolbox','version','1.0');
getpref('mytoolbox','version')

% The first call to getpref adds the 'version' preference and sets its value to the default value, 1.0. The second call to getpref verifies that the preference exists, and that its value is 1.0.
% Copyright 2015 The MathWorks, Inc.