www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgsumconstraint/getInputs.m

    function pInp = getInputs(obj)
%GETINPUTS Get the list of input variables
%
%  PINP = GETINPUTS(OBJ) returns a (1-by-N) pointer vector that contains
%  pointers to CAGE variable expressions.  These variables are all of the
%  ones that affect the output value of the item when it is evaluated.

%  Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc.


if isvalid(obj.Expression)
    % Weights pointer should be valid once there is an expression
    pInp = [obj.Weights, obj.Expression.getinports];
else
    % Only return weights if it is valid
    pInp = obj.Weights(isvalid(obj.Weights));
end