Forcing positive values when solving system of linear equations
이전 댓글 표시
For finding the least squared error solution for X for the equation:
Ax = B
I am currently doing:
x = pinv(A) * B
However, in my case, there are negative values for X in the results, which is non desireable.
Is there a way to force X to be all non-negative values when solving the equation Ax = B using preferably SVD?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Least Squares에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!