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

    function OK = isMultiModal(m)
%ISMULTIMODAL is a multimodal model
%
% OK = isMultiModal(m)

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

n = max(m.OpPoints(:,end));
OK = all(m.OpPoints(:,end)==fix(m.OpPoints(:,end))) && ...
    all(ismember(m.OpPoints(:,end),1:n)) && ...
    all(ismember(1:n,m.OpPoints(:,end)));