Line | |
---|
1 | function y = rcone(z,x,y) |
---|
2 | %RCONE Defines a rotated second order cone constraint ||z||^2<2xy, x+y>0 |
---|
3 | % |
---|
4 | % Input |
---|
5 | % z : column vector SDPVAR object. |
---|
6 | % h : scalar double or SDPVAR object |
---|
7 | % |
---|
8 | % Example |
---|
9 | % |
---|
10 | % F = set(rcone(z,x,y)) |
---|
11 | % |
---|
12 | % See also SET, CONE |
---|
13 | |
---|
14 | |
---|
15 | % Author Johan Löfberg |
---|
16 | % $Id: rcone.m,v 1.1 2006/08/10 18:00:22 joloef Exp $ |
---|
17 | |
---|
18 | if size(z,2)>1 |
---|
19 | error('z must be a column vector') |
---|
20 | end |
---|
21 | |
---|
22 | if prod(size(x))>1 |
---|
23 | error('x must be a scalar') |
---|
24 | end |
---|
25 | if prod(size(y))>1 |
---|
26 | error('y must be a scalar') |
---|
27 | end |
---|
28 | |
---|
29 | try |
---|
30 | y = [x;y;z]; |
---|
31 | y.typeflag = 5; |
---|
32 | catch |
---|
33 | error(lasterr) |
---|
34 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.