Search code examples
matlablinear-algebraleast-squares

Constrained linear least-squares for xA=b in matlab


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?


Solution

  • As David commented, it is straightforward to show that

    enter image description here

    so you can use standard methods to solve the problem with A' and b' and then transpose the answer.