source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/@logdet/plus.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 441 bytes |
Line | |
---|---|
1 | function Z = plus(X,Y) |
2 | %display Overloaded |
3 | |
4 | % Author Johan Löfberg |
5 | % $Id: plus.m,v 1.2 2004/09/19 21:33:49 johanl Exp $ |
6 | |
7 | % LOGDET + SDPVAR |
8 | if isa(Y,'logdet') |
9 | Z = X; |
10 | X = Y; |
11 | Y = Z; |
12 | end |
13 | |
14 | if prod(size(Y))>1 |
15 | error('Only scalar terms can be added to a logdet term'); |
16 | end |
17 | |
18 | if isa(Y,'logdet') |
19 | Z = X; |
20 | Z.P = blkdiag(Z.P,Y.P); |
21 | return |
22 | end |
23 | |
24 | |
25 | Z = X; |
26 | if isempty(Z.cx) |
27 | Z.cx = Y; |
28 | else |
29 | Z.cx = plus(Z.cx,Y); |
30 | end |
Note: See TracBrowser
for help on using the repository browser.