uminus.m
来自「optimization toolbox」· M 代码 · 共 27 行
M
27 行
function Y = uminus(Y)
%UMINUS (overloaded)
% Author Johan L鰂berg
% $Id: uminus.m,v 1.4 2006/01/26 13:44:13 joloef Exp $
if isa(Y,'blkvar')
Y = sdpvar(Y);
end
switch Y.typeflag
case {0,1,2,3,4}
Y.basis = -Y.basis;
%case {1,3,4}
%error('Relational objects canot be manipulated')
case 9
Y.extra.M = -Y.extra.M;
Y.extra.negated = ~Y.extra.negated;
case 5
error('Cone object cannot be negated');
otherwise
end
% Reset info about conic terms
Y.conicinfo = [0 0];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?