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

    function IsStored = hasFreeValueRange(optim, pValue)
%HASFREEVALUERANGE Check whether free values have stored ranges
%
%  ISSTORED = HASFREEVALUERANGE(OPTIM, PVALUE) returns a logical vector the
%  same size as pValue that contains true values for each entry in pValue
%  that has a stored operating range that overrides the default range
%  setting from the variable.  A false value means that that value is using
%  the range settings that are taken from the variable dictionary

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


if nargin<2
    pValue = getfreevalues(optim);
end

G = optim.SetupGUID;
Ranges = parrayeval(pValue, @getstorevalue, {G, -1});
IsStored = ~cellfun('isempty', Ranges);