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

    function  [c,sel]=constraintgui(c,index)
%CONSTRAINTGUI Graphically edit a constraint
%
%  [C,SEL] = CONSTRAINTGUI(C,INDEX)

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



% return list of constraint options for designs
opts = getconstrainttypes(c);
startobj = c.Constraints{index};
[obj, ok] = guiTypeChooser(startobj, opts);
if ok
    c.Constraints{index} = obj;
    sel = index;
else
    sel = 0;
end