www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgrangeconstraint/getNumOutputs.m
function nOut = getNumOutputs(obj, InSize) %GETNUMOUTPUTS Return the number of outputs % % NOUT = GETNUMOUTPUTS(OBJ, INSIZE) returns the number of output values % that the item can produce, as a function of the lengths of the inputs. % Copyright 2006 The MathWorks, Inc. nPts = max(InSize); if isempty(getBoundedExpression(obj)) || ~all(InSize==nPts | InSize==1) nOut = 0; else nOut = 2*nPts; if pIsScalarInfBound(obj, 'lower') nOut = nOut - nPts; end if pIsScalarInfBound(obj, 'upper') nOut = nOut - nPts; end end