Line | |
---|
1 | function p = ellipsoid(X) |
---|
2 | % polytope Converts set object to ELLIPSOID object |
---|
3 | % |
---|
4 | % E = ellipsoid(F) |
---|
5 | % [P,x] = ellipsoid(F) |
---|
6 | % |
---|
7 | % P : ELLIPSOID object (Requires the Ellipsoidal Toolbox) |
---|
8 | % x : sdpvar object defining the variables in the polytope P.H*x<P.K |
---|
9 | |
---|
10 | % Author Johan Löfberg |
---|
11 | % $Id: ellipsoid.m,v 1.1 2005/10/02 19:12:14 joloef Exp $ |
---|
12 | |
---|
13 | |
---|
14 | if all(is(X,'element-wise'))% & all(is(X,'linear')) |
---|
15 | f = []; |
---|
16 | for i = 1:length(X) |
---|
17 | if X.clauses{i}.type==2 |
---|
18 | fi = X.clauses{i}.data; |
---|
19 | [Q,c,f,x,info] = quaddecomp(fi); |
---|
20 | p=ellipsoid(c,-Q); |
---|
21 | end |
---|
22 | end |
---|
23 | |
---|
24 | else |
---|
25 | error('ELLIPSOID can only be applied to SET objects with quadratic inequalities.') |
---|
26 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.