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

    function numlab = getNumConstraintLabels(optimstore)
%GETNUMCONSTRAINTLABELS Return the number of constraint labels
%
%   OUT = GETNUMCONSTRAINTLABELS(OPTIMSTORE) returns the number of
%   constraint labels in the optimization
%
%   See also CGOPTIMSTORE/GETNUMOBJECTIVELABELS

%   Copyright 2006-2009 The MathWorks, Inc.

opts = getOptimOptions(optimstore.OptimRunner,'full');
conlab = getConstraints(opts);
numlab = length(conlab);