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

    function varargout= set(m,prop,value)
%SET overloaded set for xregcubic
%
% m= set(m,prop,value)


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



switch lower(prop)
case 'order' 
    value=value(:)';
    if m.MaxInteract> max(value)
        m.MaxInteract = max(value);
    end
    m= termCount(m,value,m.MaxInteract);
    % set constant term to be always in
    m= setstatus(m,1,1);
    
case 'maxinteract'
    ord = get(m,'order');
    if all(value>ord)
        error(message('mbc:xregcubic:InvalidValue'))
    end
    
	m= termCount(m,get(m,'order'),value);
   
otherwise
   % get properties from parent
   m.xreglinear= set(m.xreglinear,prop,value);
end

if nargout==1
   varargout{1}= m;
else
   assignin('caller',inputname(1),m)
end