Rev | Line | |
---|
[37] | 1 | function LinearVariables = depends(x) |
---|
| 2 | %DEPENDS Returns indicies to variables used in an SDPVAR object |
---|
| 3 | % |
---|
| 4 | % i = depends(x) |
---|
| 5 | % |
---|
| 6 | % Input |
---|
| 7 | % x : SDPVAR object |
---|
| 8 | % Output |
---|
| 9 | % i : DOUBLE |
---|
| 10 | |
---|
| 11 | % Author Johan Löfberg |
---|
| 12 | % $Id: depends.m,v 1.8 2005/04/14 10:27:09 joloef Exp $ |
---|
| 13 | |
---|
| 14 | [mt,variabletype] = yalmip('monomtable'); |
---|
| 15 | |
---|
| 16 | % Simple linear cases |
---|
| 17 | if ~any(variabletype(x.lmi_variables)) |
---|
| 18 | LinearVariables = x.lmi_variables; |
---|
| 19 | else |
---|
| 20 | LinearVariables = find(any(mt(x.lmi_variables,:),1)); |
---|
| 21 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.