source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/@logdet/minus.m @ 37

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

Added original make3d

File size: 671 bytes
Line 
1function Z = minus(cx,P)
2%display           Overloaded
3
4% Author Johan Löfberg
5% $Id: minus.m,v 1.2 2004/09/19 21:33:49 johanl Exp $ 
6
7% Standard case c't-logdet(P)
8
9if isa(P,'logdet') % sdpvr - logdet
10
11    if prod(size(cx))>1
12        error('Only scalar terms can be added to a logdet term');
13    end
14   
15    if isa(cx,'logdet')
16        error('Logdet objects can only be added');
17    end
18   
19    Z = P;
20    if isempty(P.cx)
21        Z.cx = cx;
22    else
23        Z.cx = cx-P.cx;
24    end
25    Z.gain = -Z.gain;
26else % logdet - cx
27    temp = cx;
28    cx = P;
29    P = temp;
30   
31    Z = P;
32    if isempty(P.cx)
33        Z.cx = -cx;
34    else
35        Z.cx = P.cx-cx;
36    end
37end
Note: See TracBrowser for help on using the repository browser.