www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregmulti/setInputs.m
function m = setInputs(m,factorInfo,varargin) %SETINPUTS -- set input information for a model % % M = SETINPUTS(FACTORINFO) % where FACTORINFO is a % NUMFACTORS % MBCINPUTFACTOR Array % CELL ARRAY NUMFACTORS by five cell array, creates a model with NUMFACTORS input % factors and sets the factor names, symbols, ranges and non-linear % transforms based on values of the FACTORINFO. % COPYTARGETS (default=false) uses targets from specified inputs % otherwise the model retains its current target. % Copyright 2007 The MathWorks, Inc. if isa(factorInfo,'xregmodel') factorInfo = getInputs(factorInfo); else % make new input object factorInfo = mbcinputfactor(factorInfo); end nf = nfactors(m); if length(factorInfo)~=nf error(message('mbc:xregmulti:InvalidInput')); end % update internal models - full input transform done in internal models m = updateInternalModels(m,@setInputs,factorInfo,varargin{:}); % no transform for outer model for i=1:nf factorInfo(i).NonlinearTransform = ''; end m.xregmodel = setInputs(m.xregmodel,factorInfo);