Line | |
---|
1 | function X = real(X) |
---|
2 | %REAL (overloaded) |
---|
3 | |
---|
4 | % Author Johan Löfberg |
---|
5 | % $Id: real.m,v 1.1 2006/08/10 18:00:22 joloef Exp $ |
---|
6 | |
---|
7 | %Y = X; |
---|
8 | %x_lmi_variables = X.lmi_variables; |
---|
9 | %lmi_variables = []; |
---|
10 | %n = X.n; |
---|
11 | %m = X.m; |
---|
12 | |
---|
13 | X.basis = real(X.basis); |
---|
14 | X = clean(X); |
---|
15 | if isa(X,'sdpvar') |
---|
16 | X.conicinfo = [0 0]; |
---|
17 | end |
---|
18 | |
---|
19 | % realX = real(X.basis(:,1)); |
---|
20 | % Y.basis = realX(:); |
---|
21 | % j = 1; |
---|
22 | % for i = 1:length(x_lmi_variables) |
---|
23 | % realX = real(X.basis(:,i+1)); |
---|
24 | % if (norm(realX,inf)>0) |
---|
25 | % Y.basis(:,j+1) = realX(:); |
---|
26 | % lmi_variables = [lmi_variables x_lmi_variables(i)]; |
---|
27 | % j = j+1; |
---|
28 | % end |
---|
29 | % end |
---|
30 | % |
---|
31 | % if isempty(lmi_variables) |
---|
32 | % Y = full(reshape(Y.basis,n,m)); |
---|
33 | % else |
---|
34 | % Y.lmi_variables = lmi_variables; |
---|
35 | % % Reset info about conic terms |
---|
36 | % Y.conicinfo = [0 0]; |
---|
37 | % end |
---|
Note: See
TracBrowser
for help on using the repository browser.