source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/modules/global/constraint_residuals.m @ 37

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

Added original make3d

File size: 452 bytes
Line 
1function res = constraint_residuals(p,x)
2res= [];
3if p.K.f>0
4    res = -abs(p.F_struc(1:p.K.f,:)*[1;x]);
5end
6if p.K.l>0
7    res = [res;p.F_struc(p.K.f+1:p.K.f+p.K.l,:)*[1;x]];
8end
9if (length(p.K.s)>1) | p.K.s>0
10    top = 1+p.K.f+p.K.l;
11    for i = 1:length(p.K.s)
12        n = p.K.s(i);
13        X = p.F_struc(top:top+n^2-1,:)*[1;x];top = top+n^2;
14        X = reshape(X,n,n);
15        res = [res;min(eig(X))];
16    end
17end
18res = [res;min([p.ub-x;x-p.lb])];
Note: See TracBrowser for help on using the repository browser.