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 (none), 14 years ago

Added original make3d

File size: 441 bytes
Line 
1function 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
8if isa(Y,'logdet')
9    Z = X;
10    X = Y;
11    Y = Z;
12end
13
14if prod(size(Y))>1
15    error('Only scalar terms can be added to a logdet term');
16end
17
18if isa(Y,'logdet')
19    Z = X;
20    Z.P = blkdiag(Z.P,Y.P);
21    return
22end
23
24
25Z = X;
26if isempty(Z.cx)
27    Z.cx = Y;
28else
29    Z.cx = plus(Z.cx,Y);
30end
Note: See TracBrowser for help on using the repository browser.