I'm using Matlab to solve this problem and have tried
x=(A'A)^-1A'b
x=A\b
x=lsqnonneg(A,b)
The first two generates roughly the same answer, which contains negative values. The third one, which i found only yesterday, gives an answer with only positive or 0-values in x but it is still not even...
Thanks for the quick reply.
I think I have to expand my problem a bit.
What I have in b is a set of measured weights of products, and in A i have the amounts of different components used to create these weights, x is the component weights I want to find. In a smaller scale it could look...
Hi everyone.
Is there any way to set demands on least square solutions?
I have an equation on the form Ax=b, which is solved for x as:
x=(A'*A)^-1*A'*b
I do know for a fact that all values in x should be positive, but the least square solution for my particular system contains a...