source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/@sdpvar/domain.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 899 bytes
Line 
1function 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
8if 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
26end
27error('DOMAIN can only be applied to simple MPT related PWA objects')
Note: See TracBrowser for help on using the repository browser.