function additionalargs = validateDisallowedParameters(mdl,params,varargin) %#ok<INUSL>
%

%   Copyright 2020 The MathWorks, Inc.
p = inputParser;
p.StructExpand = true;
p.KeepUnmatched = true;
for ii = 1:numel(params)
    addParameter(p,params{ii},[]);
end
parse(p,varargin{:});
for ii = 1:numel(params)
    if ~isempty(p.Results.(params{ii}))
        error(message('stats:incremental:Offline:NameValueNotAllowed',params{ii}));
    end
end
additionalargs = p.Unmatched;

end