?? constraint.m
字號:
function F = constraint(X,quantifier,Y)
% Internal class for constraint list
% Author Johan L鰂berg
% $Id: constraint.m,v 1.5 2005/06/02 13:40:00 joloef Exp $
superiorto('sdpvar');
superiorto('double');
if isa(X,'blkvar')
X = sdpvar(X);
end
if isa(Y,'blkvar')
Y = sdpvar(Y);
end
% Try to evaluate
switch quantifier
case {'>','>='}
Z = X - Y;
case {'<','<=','=='}
Z = Y - X;
otherwise
error('Quantifier not supported')
end
F.List={X,quantifier,Y};
F.Evaluated{1} = Z;
switch quantifier
case {'>','<'}
F.strict(1) = 1;
case {'>=','<=','=='}
F.strict(1) = 0;
otherwise
error('Quantifier not supported')
end
F = class(F,'constraint');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -