Solve linear system of equations with constains
2 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone. I have a linear system of equations that make a matrix, L*x=R. x is composed on many variables, e.g. x=[x1 x2 x3 x4 ... xN]. I want to solve this system of equation with constraints x1>|x2|>|x3|>|x4|...>|xN|. Can I use lsqlin(L,R) with some additional input to realize it?
Many thanks.
0 件のコメント
採用された回答
Matt J
2018 年 2 月 25 日
編集済み: Matt J
2018 年 3 月 2 日
If you make the change of variables x(i)=u(i)-v(i) with linear constraints
u(i)>=0,
v(i)>=0,
u(i)+v(i)>=u(i+1)+v(i+1)
and modify your least squares objective from norm(L(u-v)-R)^2 to
norm(L(u-v)-R)^2 + C*( norm(u)^2 + norm(v)^2)
then for a sufficiently small choice of C>0, this should give an equivalent solution. It's not ideal, since it forces you to re-solve with multiple choices of C, but on the other hand, it allows you to pose this as a convex problem.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!