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

    function c = conswitch(cif,nLocal,copts)
%CONSWITCH point-by-point boundary model class
%
% c = conswitch(cif)

%  Copyright 2007-2008 The MathWorks, Inc. 

if nargin && isa(cif,'conswitch')
    c = cif;
    return
end
c.ConList = {};
c.OpPoints = [];
c.ActiveFactors = {};
c.Tolerance = 1e-8;
c.Version = 1;
if nargin==0
    cif = coninputfactor(xregcubic);
end

c = class(c,'conswitch',conbase(cif));
if nargin<2
    nLocal = 2;
end
if nargin<3
    if nLocal<2
        copts.ConType = 'range';
    else
        copts.ConType = 'convexhull';
    end
end

c.ConList = localconstraints(c,copts,nLocal);