Optimization with boundaries constraints
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I am trying to solve the x that will minimize the following equation:
eq = @(x) norm(r_column-(G*x+d))^2;
Where G is 933x933, d is 933x1 and x should be 933x1, r_column is 933x1
I have the following constraints: xmin = ones(933,1)*(-30); xmax = ones(933,1)*(30);
However, if I try to solve it like this: x = fminbnd(eq,xmin,xmax);
I get an error.
I hope someone can help me, thanks in advance!
Loïc
댓글 수: 0
답변 (1개)
Torsten
2016년 12월 15일
Try "lsqlin".
Best wishes
Torsten.
댓글 수: 5
Torsten
2016년 12월 15일
z = [eye(933) ; -eye(933)];
b = [ ones(933,1)*30 ; ones(933,1)*30];
x = lsqlin(-G,d-r_column,z,b);
Best wishes
Torsten.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!