Quantcast
Channel: MATLAB Central Newsreader - tag:"optimization"
Viewing all articles
Browse latest Browse all 130

Solve constrained overdetermined equations

$
0
0
I need to solve a constrained least square problem:

A is a 6x6 matrix.
A=[1 0 0 0 0 1;
      1 1 0 0 0 0;
      0 1 1 0 0 0;
      0 0 1 1 0 0;
      0 0 0 1 1 0
      0 0 0 0 1 1];
B=[3; 2; 1; 2; 2; 2];
to solve
A*X=B,
subject to x(1)+x(2)+x(3)+x(4)+x(5)=1, and 0<=x(i)<=1.

When I use lsqlin to solve this optimisation problem, it shows the all x(i)=1, and the convergence is satisfied.

How should I do? lsqlin doesnot have the tolerance setting.

Viewing all articles
Browse latest Browse all 130

Trending Articles