www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgsumconstraint/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 2005 The MathWorks, Inc. and Ford Global Technologies, Inc. maxIn = max(InSize); if ~isvalid(obj.Expression) || ~all(InSize==maxIn | InSize==1) % No outputs for mismatched sizes nOut = 0; else nOut = 1; end