www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@localtruncps/set.m
function varargout=set(m,Property,Value) %SET set localtruncps properties % m=set(m,Property,Value) % Copyright 2000-2011 The MathWorks, Inc. and Ford Global Technologies, Inc. switch lower(Property) case 'knot' nk= length(Value); if length(m.knots)~=nk nl= m.order; p= ones(nl+nk,1); m.xreglinear= update(m.xreglinear,p); end m.knots= Value; case 'order' m.order= Value; p= zeros(m.order+length(m.knots),1); m.xreglinear = update(m.xreglinear,p); otherwise [m.localmod,Found] =set(m.localmod,Property,Value); if ~Found try m.xreglinear=set(m.xreglinear,Property,Value); catch % throw an error back to MATLAB error(message('mbc:localtruncps:InvalidProperty', Property)); end end end if nargout==1 varargout{1}=m; else assignin('caller',inputname(1),m); end