source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/@lmi/reduce.m @ 37

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

Added original make3d

File size: 705 bytes
Line 
1function F = projection(F,x,method)
2% REDUCE  Removes redundant constraints using MPT
3%
4% Freduced  = reduce(F)
5%
6% F  :  Polytopic SET object
7%
8% See also POLYTOPE, PROJECTION
9
10% Author Johan Löfberg
11% $Id: reduce.m,v 1.3 2005/02/04 10:10:27 johanl Exp $
12
13f = [];
14for i = 1:length(F)
15    if  F.clauses{i}.type==2
16        fi =  F.clauses{i}.data;
17        f = [f;fi(:)];
18    else
19        error('Only linear element-wise inequalities can be reduced')
20    end
21end
22
23if ~islinear(F)
24    error('Only linear element-wise inequalities can be reduced')
25end
26
27B = full(getbase(f));
28P = polytope(-B(:,2:end),B(:,1));
29
30x_vars = getvariables(F);
31x = recover(x_vars);
32
33H = get(P,'H');
34K = get(P,'K');
35
36F = set(H*x < K);
Note: See TracBrowser for help on using the repository browser.