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

    function numlab = getNumObjectiveLabels(optimstore)
%GETNUMOBJECTIVELABELS Return the number of objective labels
%   NUMLAB = GETNUMOBJECTIVELABELS(OPTIMSTORE) returns the number of
%   objective labels in the optimization
%   
%   See also: CGOPTIMSTORE/GETNUMCONSTRAINTLABELS. 

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


opts = getOptimOptions(optimstore.OptimRunner,'full');
objlab = getObjectives(opts);
numlab = length(objlab);