%% Add Parameter Value Input
% Create an inputParser object and add a name-value pair into the input scheme.

p = inputParser;
paramName = 'myParam';
defaultVal = 0;
addParameter(p,paramName,defaultVal)

%
% Pass both the parameter name and value to the parse method, and display the results.

parse(p,'myParam',100);
p.Results

% Copyright 2015 The MathWorks, Inc.