Solving large sparse Ax=b with lower bound constraint

조회 수: 2 (최근 30일)
Uanite
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 https://web.stanford.edu/group/SOL/software/cgls/).
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.

채택된 답변

Torsten
Torsten 2020년 4월 11일
Did you try starting from the solution of the unconstraint problem ?
  댓글 수: 1
Uanite
Uanite 2020년 4월 19일
Somehow missed that option, yep that helped it converge!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by