MATLAB Answers

Solving large sparse Ax=b with lower bound constraint

5 ビュー (過去 30 日間)
Uanite 2020 年 4 月 11 日
コメント済み: Uanite 2020 年 4 月 19 日
I'm having some issues with some forward modelling I'm doing - im doing a forward model in a loop and currently solving an Ax=b system using a conjugate gradient least squares method (code from
My problem is that this solution is unconstrained, and so the solution converges close to the answer I expect, but has values outside permitted bounds still. If my constraint is say x >= c (c is a vector), is there a matlab inbuilt function that can do this?? I've tried lsqlin(A,b,[],[],[],[],c,[]) rather than the cgls function linked above, but the model no longer converges to a result that is even remotely correct.

  0 件のコメント

Sign in to comment.


Torsten 2020 年 4 月 11 日
Did you try starting from the solution of the unconstraint problem ?

  1 件のコメント

Uanite 2020 年 4 月 19 日
Somehow missed that option, yep that helped it converge!

Sign in to comment.

その他の回答 (0 件)

Translated by