www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgexpr/getEvalDependencies.m
function [pInp, Funcs] = getEvalDependencies(obj, op) %GETEVALDEPENDENCIES Get input requirements for an evaluation operation % % [PINP, FUNCS] = GETEVALDEPENDENCIES(OBJ, OP) returns a list of input % pointers and the function that should be called on each one in order to % generate the inputs for the specified evaluation operation. OP should % be either a string or function handle to an expression method that % accepts a cell array of input values and operates on them to produce an % output, for example evalAtInputs, cevalAtInputs or pevevalAtInputs. % Copyright 2005-2007 The MathWorks, Inc. and Ford Global Technologies, Inc. if isa(op, 'function_handle') funcinfo = functions(op); op = funcinfo.function; end % Default behaviours always require a single operation on each input pInp = getinputs(obj); Funcs = cell(size(pInp)); if ~isempty(pInp) if strcmp(op, 'cevalAtInputs') % Only use inputs that actually have a boundary pInp = pfilter(pInp, @concheck); % Constraints require the constraints of the inputs Funcs = cell(size(pInp)); Funcs(:) = {@cevalAtInputs}; else % All other known operations require Funcs(:) = {@evalAtInputs}; end end