source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/@lmi/ellipsoid.m

Last change on this file was 37, checked in by (none), 14 years ago

Added original make3d

File size: 708 bytes
Line 
1function 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
14if 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   
24else
25    error('ELLIPSOID can only be applied to SET objects with quadratic inequalities.')
26end
Note: See TracBrowser for help on using the repository browser.