function mustBeNameValuePairs(pvpairs)
% Checks that name/value pairs are properly formatted.

%   Copyright 1986-2017 The MathWorks, Inc.
ni = length(pvpairs);
if ~(rem(ni,2)==0 && ltipack.isNameList(pvpairs(1:2:ni)))
   error(message('Control:general:OptionHelper1'))
end