Line | |
---|
1 | function Y=plot(varargin) |
---|
2 | %DOMAIN Extract domain for PWA variable |
---|
3 | |
---|
4 | % Author Johan Löfberg |
---|
5 | % $Id: domain.m,v 1.3 2006/03/22 15:41:14 joloef Exp $ |
---|
6 | |
---|
7 | % Fast version for plotting simple PWA objects |
---|
8 | if nargin == 1 |
---|
9 | X = varargin{1}; |
---|
10 | if isa(varargin{1},'sdpvar') |
---|
11 | if length(X) == 1 |
---|
12 | if length(getvariables(X))==1 |
---|
13 | extstruct = yalmip('extstruct',getvariables(X)); |
---|
14 | if ~isempty(extstruct) |
---|
15 | if isequal(extstruct.fcn,'pwa_yalmip') | isequal(extstruct.fcn,'pwq_yalmip') |
---|
16 | Y = []; |
---|
17 | for i = 1:length(extstruct.arg{1}) |
---|
18 | Y = [Y extstruct.arg{1}{i}.Pn]; |
---|
19 | end |
---|
20 | return |
---|
21 | end |
---|
22 | end |
---|
23 | end |
---|
24 | end |
---|
25 | end |
---|
26 | end |
---|
27 | error('DOMAIN can only be applied to simple MPT related PWA objects') |
---|
Note: See
TracBrowser
for help on using the repository browser.