www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conellipsoid/nFeatures.m

    function n = nFeatures(con)
%NFEATURES Number of parameters in a (local) constraint
%
%   N = NFEATURES(CON) is the number of features (parameters) of the local
%   constraint CON. 
%
%   See also CONELLIPSOID, 
%            CONELLIPSOID/GETFEATURES,
%            CONELLIPSOID/SETFEATURES,
%            CONELLIPSOID/NFEATURES.

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

d = nActiveFactors( con );
n = d + 0.5 * d * (d + 1);