问题
I want to solve xA=b
with constraint 0<=x
for x
.
I found functions like lsqnonneg and lsqlin which solves for Ax=b
. However, couldn't find a good way to solve for xA=b
.
How can I solve xA=b
with non-negative x
constraint?
回答1:
As David commented, it is straightforward to show that
so you can use standard methods to solve the problem with A' and b' and then transpose the answer.
来源:https://stackoverflow.com/questions/26600699/constrained-linear-least-squares-for-xa-b-in-matlab