www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgprecpolyfix/set.m

    function Prec = set(Prec, PropertyName, PropertyValue)
%SET Set properties of a cgprecpolyfix object.
%
%   POLYFIXPREC = SET(POLYFIXPREC, PROPERTY, VALUE) modifies the property
%   PROPERTY of a cgprecpolyfix object POLYFIXPREC to a value VALUE.

%   Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc.


if nargin~=3
    error(message('mbc:cgprecpolyfix:InvalidArgument4'));
end

% Try to use extra input as a property name if valid
switch lower(PropertyName)
    case 'numcoeff',
        % Set NumCoeff
        Prec.NumCoeff = PropertyValue;
    case 'dencoeff',
        % Set DenCoeff
        Prec.DenCoeff = PropertyValue;
    case 'physrange',
        % Set PhysRange
        Prec.PhysRange = PropertyValue;
    otherwise
        % No valid property name at this level, try the superclass
        Prec.cgprecfix = ...
            set(Prec.cgprecfix, PropertyName, PropertyValue);
end