Rev | Line | |
---|
[37] | 1 | function see(X,showfull) |
---|
| 2 | %SEE Displays internal structure of variable |
---|
| 3 | % |
---|
| 4 | % Shows the base matrices that build up the variable |
---|
| 5 | % |
---|
| 6 | % X = X0+x_1*X1+x_2*X2+... |
---|
| 7 | % |
---|
| 8 | % SEE(X) Display matrices Xi in dense format |
---|
| 9 | % SEE(X,'sparse') Display matrices Xi in sparse format |
---|
| 10 | % |
---|
| 11 | % See also SDPVAR |
---|
| 12 | |
---|
| 13 | % Author Johan Löfberg |
---|
| 14 | % $Id: see.m,v 1.2 2004/07/02 08:17:32 johanl Exp $ |
---|
| 15 | |
---|
| 16 | disp(' '); |
---|
| 17 | if nargin==1 |
---|
| 18 | disp('Constant matrix');disp(' ') |
---|
| 19 | disp(full(X)) |
---|
| 20 | disp('Base matrices');disp(' ') |
---|
| 21 | disp('[]') |
---|
| 22 | disp(' ') |
---|
| 23 | disp('Used variables');disp(' ') |
---|
| 24 | disp('[]') |
---|
| 25 | else |
---|
| 26 | switch showfull |
---|
| 27 | case 'sparse' |
---|
| 28 | disp('Constant matrix');disp(' ') |
---|
| 29 | disp((X)) |
---|
| 30 | disp('Base matrices');disp(' ') |
---|
| 31 | disp('[]') |
---|
| 32 | disp(' ') |
---|
| 33 | disp('Used variables');disp(' ') |
---|
| 34 | disp('[]') |
---|
| 35 | |
---|
| 36 | case 'full' |
---|
| 37 | see(X) |
---|
| 38 | otherwise |
---|
| 39 | error('Second argument should be ''sparse'' or ''full') |
---|
| 40 | end |
---|
| 41 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.