www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregtwostage/nlconstraints.m
function g= nlconstraints(p,TS,varargin); % TWOSTAGE/NLCONSTRAINTS % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. Nf= length(TS.Global); st=1; g= cell(Nf,1); for i=1:Nf; Np= numNLParams(TS.Global{i}); if Np % update the nonlinear global model in TS object m= nlupdate(TS.Global{i},p(st:st+Np-1)); st= st+Np; end g{i}= nlconstraints(m,varargin{:}); end g= cat(1,g{:});