www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregmodswitch/getSwitchFactors.m

    function factIdx = getSwitchFactors(m)
%GETSWITCHFACTORS Return vector indicating which factors are being switched
%
%  FACTIDX = GETSWITCHFACTORS(M) returns a vector of indices indicating
%  which factors are being used for switching.

%  Copyright 2000-2007 The MathWorks, Inc. and Ford Global Technologies, Inc.


nf= nfactors(m);
nSwitch = size(m.OpPoints, 2);
factIdx = (nf-nSwitch+1):nf;