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 , 14 years ago | |
---|---|
File size: 452 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function res = constraint_residuals(p,x) |
2 | res= []; | |
3 | if p.K.f>0 | |
4 | res = -abs(p.F_struc(1:p.K.f,:)*[1;x]); | |
5 | end | |
6 | if p.K.l>0 | |
7 | res = [res;p.F_struc(p.K.f+1:p.K.f+p.K.l,:)*[1;x]]; | |
8 | end | |
9 | if (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 | |
17 | end | |
18 | res = [res;min([p.ub-x;x-p.lb])]; |
Note: See TracBrowser
for help on using the repository browser.