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

    function obj = removeOperatingPointSet(obj, sLabel)
%REMOVEOPERATINGPOINTSET  Remove an operating point set from the optimization.
%   OPTIONS = REMOVEOPERATINGPOINTSET (OPTIONS, LABEL) removes the
%   placeholder for the operating point set referred to by the string
%   LABEL.
%
%   See also CGOPTIMOPTIONS/GETOPERATINGPOINTSETS,
%            CGOPTIMOPTIONS/ADDOPERATINGPOINTSET.

%  Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc.


if ~ischar(sLabel)
    error(message('mbc:cgoptimoptions:InvalidArgument17'));
end

varIndex = strcmp(sLabel, {obj.operatingpoints.details.label});
if ~any(varIndex)
    warning(message('mbc:cgoptimoptions:InvalidLabel3', sLabel));
else
    obj.operatingpoints.details = obj.operatingpoints.details(~varIndex);
end