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

    function ind = getLocalIndices(con)
%GETLOCALINDICES List of indices of the local factors in a two-stage constraint
%
%  I = GETLOCALINDICES(CON) is a list of the indices of the local factors of
%  the two-stage constraint C.
%
%  See also CONTWOSTAGE, 
%           CONTWOSTAGE/GETGLOBALFACTORS, 
%           CONTWOSTAGE/GETLOCALFACTORS, 
%           CONTWOSTAGE/GETLOCALINDICES.

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

ai = getActiveIndices( con );
nf = nFactors( con.ConList{1} ); % number of local factors

ind = ai(1:nf);