source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/dev/tests-mbg/sos/test_sos_rostalski.m @ 37

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

Added original make3d

File size: 622 bytes
Line 
1function sos_rostalski
2
3% This test checks that YALMIP correcly detects
4% a trivially infeasible SOS problem, when the
5% image model is used. for kernel model, the solver
6% should fail, but doesn't due to numerical reasons
7
8x=sdpvar(2,1);
9p = x(1)^8+x(2)^7+x(1)*x(2);
10
11axu=[1;1];
12bxu=[1];
13f=axu'*x+bxu
14A=[ 1   0;
15-1   0;
16  0   1;
17  0 -1];
18B=[1;1;1;1];
19h=[A*x-B];
20
21s = [];
22F= set([]);
23v= monolist(x,2); % all monomials of total degree<2
24
25for i = 1:4;
26 c = sdpvar(length(v));
27 s = [s v'*c*v]
28 F = F + set(c>0);
29end
30
31
32sol = solvesos(set(sos(p-f+s*h))+F,[],sdpsettings('sos.model',2))
33
34mbg_asserttolequal(sol.problem,2);
Note: See TracBrowser for help on using the repository browser.