ellipsoid.m
来自「matlab波形优化算法经常要用到的matlab toolbox工具箱:yalm」· M 代码 · 共 26 行
M
26 行
function p = ellipsoid(X)
% polytope Converts set object to ELLIPSOID object
%
% E = ellipsoid(F)
% [P,x] = ellipsoid(F)
%
% P : ELLIPSOID object (Requires the Ellipsoidal Toolbox)
% x : sdpvar object defining the variables in the polytope P.H*x<P.K
% Author Johan L鰂berg
% $Id: ellipsoid.m,v 1.1 2005/10/02 19:12:14 joloef Exp $
if all(is(X,'element-wise'))% & all(is(X,'linear'))
f = [];
for i = 1:length(X)
if X.clauses{i}.type==2
fi = X.clauses{i}.data;
[Q,c,f,x,info] = quaddecomp(fi);
p=ellipsoid(c,-Q);
end
end
else
error('ELLIPSOID can only be applied to SET objects with quadratic inequalities.')
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?