www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@localmulti/set.m
function varargout= set(L,Property,Value) %SET set localmulti properties % m=set(m,Property,Value) % Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. switch lower(Property) case 'fitalg' case 'select' statsList = StatsList(L); if ischar(Value) % string if ~any(strcmpi(Value,statsList)) % need to find a new selection statistics if any(strcmpi(statsList,'AICc')) % use AICc first Value= 'AICc'; elseif any(strcmpi(statsList,'PRESS RMSE')) % use PRESS RMSE Value= 'PRESS RMSE'; else % finally use RMSE Value= 'RMSE'; end end elseif Value==fix(Value) && Value>0 && Value <= length(statsList) Value = statsList{Value}; else error(message('mbc:localmulti:InvalidValue3')) end L.Select = Value; L.xregmulti= addSummaryStats(L.xregmulti,L.Select); case 'autocoderange' if isscalar(Value) && islogical(Value) L.AutoCodeRange = Value; else error(message('mbc:localmulti:InvalidValue4')) end case 'allfitted' if Value if L.version<3 defL = localmulti; L.version = defL.version; end else L.version = 2; end otherwise [L.localmod,Found] =set(L.localmod,Property,Value); if ~Found L.xregmulti= set(L.xregmulti,Property,Value); end end if nargout varargout{1}=L; else assignin('caller',inputname(1),L); end