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

    function idx = getObjectiveIndex(opts, label)
%GETOBJECTIVEINDEX Get index of an objective
%
%  IDX = GETOBJECTIVEINDEX(OPTS, LABEL) returns the index of the objective
%  with the label LABEL in the optimization setup.

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


[unused, idx] = ismember(label, getObjectiveLabels(opts));