www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgpointobjective/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.


nOut = max(InSize);
if ~isvalid(obj.Expression) || ~all(InSize==nOut | InSize==1)
    % No outputs for mismatched sizes
    nOut = 0;
end