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

    function cif = getActiveFactors(con)
%GETACTIVEFACTORS Get the active factors for a constraint
%
%  CIF = GETACTIVEFACTORS(CON)
%
%  See also CONBASE, CONINPUTFACTOR, CONBASE/GETINPUTFACTORS.

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

cif = con.InputFactors;
ai = getActiveIndices(con);
n= length(cif);
if ~isequal(1:n,ai) || islogical(ai) 
    % don't subsref unless we need to
    cif = cif(ai);
end

%------------------------------------------------------------------------------|
% EOF
%------------------------------------------------------------------------------|