function this = applyPropertyPairs(this, varargin)
%APPLYPROPERTYPAIRS Apply propery pairs to the options object

%  Copyright 1986-2004 The MathWorks, Inc.
%  $Revision: 1.1.6.1 $   $Date: 2004/12/26 21:52:15 $

if ~isempty(varargin)
    narg = length(varargin);
    if ~rem(narg,2)
        for ct = 1:(narg/2)
            this.(varargin{2*ct-1}) = varargin{2*ct};
        end
    else
        error('Property Values must come in pairs')
    end
end