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

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

Added original make3d

File size: 602 bytes
Line 
1function Y=simplify(X)
2%SIMPLIFY  Reduce PWA complexity
3
4% Author Johan Löfberg
5% $Id: simplify.m,v 1.1 2006/06/08 15:35:19 joloef Exp $
6
7variables = getvariables(X);
8extstruct = yalmip('extstruct',variables(1));
9if ~isempty(extstruct)
10    if isequal(extstruct.fcn,'pwa_yalmip')
11        extstruct.arg{1}{1}.Fi = extstruct.arg{1}{1}.Bi;
12        extstruct.arg{1}{1}.Gi = extstruct.arg{1}{1}.Ci;
13        simplified = mpt_simplify(extstruct.arg{1}{1});
14        simplified.Bi = simplified.Fi;
15        simplified.Ci = simplified.Gi;
16        Y = pwf(simplified,extstruct.arg{2},extstruct.arg{3});
17    end
18end
Note: See TracBrowser for help on using the repository browser.