www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@modeldev/updateInputs.m

    function mdev= updateInputs(mdev,mnew,doRefit)
%UPDATEINPUTS update input information 
%
% T= updateInputs(T,mnew,doRefit)
%   mnew:   the coding and symbol information from this model is used to
%           update the modeldev node
%   doRefit: refit models (default= false)

%  Copyright 2006-2007 The MathWorks, Inc. 

if nargin<3
    doRefit= false;
end

m= model(mdev);
if isa(mnew,'xregtwostage') && ~isa(m,'xregtwostage')
    % need to extract global model
    mnew= get(mnew,'baseglobal');
end

doRefit = doRefit && (isRespFeat(mdev) || NeedsRefit(getInputs(m),getInputs(mnew)));

m= updateInputs(m,mnew);
mdev= model(mdev,m);
if doRefit
    % update model fit
    UpdateModel(mdev,1);
    mdev= info(mdev);
end