Rev | Line | |
---|
[37] | 1 | function Q=getbasematrix(X,ind) |
---|
| 2 | %GETBASEMATRIX Internal function to extract basematrix for variable IND |
---|
| 3 | |
---|
| 4 | % Author Johan Löfberg |
---|
| 5 | % $Id: getbasematrix.m,v 1.3 2006/07/26 20:17:58 joloef Exp $ |
---|
| 6 | |
---|
| 7 | if ind==0 |
---|
| 8 | base = X.basis(:,1); |
---|
| 9 | Q = reshape(base,X.dim(1),X.dim(2)); |
---|
| 10 | return; |
---|
| 11 | end |
---|
| 12 | |
---|
| 13 | here = find(X.lmi_variables==ind); |
---|
| 14 | if isempty(here) |
---|
| 15 | Q = sparse(X.dim(1),X.dim(2)); |
---|
| 16 | else |
---|
| 17 | base = X.basis(:,here+1); |
---|
| 18 | Q = reshape(base,X.dim(1),X.dim(2)); |
---|
| 19 | end |
---|
| 20 | |
---|
| 21 | |
---|
Note: See
TracBrowser
for help on using the repository browser.