www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/+cgsimfill/@EvalPoints/pFindVariable.m
function pVar = pFindVariable(V, variable) %PFINDVARIABLE return the pointer to a variable % % PVAR = PFINDVARIABLE(V, VARIABLE) % Copyright 2006-2008 The MathWorks, Inc. if isa(variable,'mbcfoundation.pointerinterface') pVar= variable.pGetPointerInstance(); elseif isa(variable,'xregpointer') pVar= variable; elseif ischar(variable) % find the input with this name pVar = pfilter( V.Inputs, @(p)strcmp(getname(p), variable) ); end