www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregtwostage/setupTargets.m
function TS = setupTargets(TS,Tgt) %SETUPTARGETS set targets for model % % m = setupTargets(m,Tgt); % Copyright 2007 The MathWorks, Inc. if nargin<2 nl = nlfactors(TS); ng = ngfactors(TS); TgtL = repmat(recommendedTgt(TS.Local),nl,1); if isSameTgt(TS) m= get(TS,'baseglobal'); % use same coding for all global TgtG= repmat(recommendedTgt(m),ng,1); else TgtG = repmat([-Inf,Inf],nfactors(TS)-nl,1); end Tgt = [TgtL;TgtG]; end TS.xregmodel = setupTargets(TS.xregmodel,Tgt);