www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/+cgsimfill/@EvalPoints/setDefaultValue.m

    function setDefaultValue(V, pValue, defValues)
%SETDEFAULTVALUE Set the default evalpoint for an input.
%
%   SETDEFAULTVALUE(V, PVALUE, DEFAULTVALUES)

%   Copyright 2006-2008 The MathWorks, Inc.


pInputs = pGetAllExpressionInputs( V );

if ~iscell( defValues )
    defValues = {defValues};
end

for n = 1:length( pValue )
    pThisValue = pValue(n);
    if ismember( pThisValue, pInputs  )
        V.pSetInStore( pThisValue, defValues{n}, 'default' );
    else
        warning(message('mbc:cgsimfill:evalpoints:InvalidPointer'));
    end
end