source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/@sdpvar/kyp.m @ 37

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

Added original make3d

File size: 843 bytes
Line 
1function sys = kyp(A,B,P,M)
2%KYP Create KYP matrix variable
3%
4%   X = KYP(A,B,P,M)       
5%
6% KYP is used to generate the matrix
7%
8% [A'*P+P*A P*B;B'*P zeros(size(B,2))]+M;
9%
10% Note, Information is stored internally
11% to inform YALMIP that this is a object
12% defined from a KYP structure. Hence,
13% the objects KYP(A,B,P,M) and the SDPVAR
14% [A'*P+P*A P*B;B'*P zeros(size(B,2))]+M
15% are not equivalent
16%
17%  See also @sdpvar/LYAP
18
19% Author Johan Löfberg
20% $Id: kyp.m,v 1.4 2005/01/20 18:37:05 johanl Exp $
21
22if isempty(B)
23    kyp_part = [A'*P+P*A];
24else
25    kyp_part = [A'*P+P*A P*B;B'*P zeros(size(B,2))];
26end
27if isempty(kyp_part)
28    sys = M;
29else
30    if isempty(M)
31        sys = kyp_part;
32    else
33        sys = kyp_part+M;
34    end
35end
36sys.typeflag = 9;
37sys.extra.A = A;
38sys.extra.B = B;
39sys.extra.P = P;
40sys.extra.M = M;
41sys.extra.negated = 0;
Note: See TracBrowser for help on using the repository browser.