Solve systems of linear equations Ax = B for x>=0

조회 수: 5 (최근 30일)
Kalen
Kalen 2013년 11월 4일
댓글: Kalen 2013년 11월 6일
BACKGROUND:
I have a set of image data where signal can leak into multiple detection channels of each image. I am attempting to reassign the leaky signal by solving the equation A*x=b where A is the percentage of real signal x that leaks into each detection channel of my acquired image b. A is a 3x3 matrix and b is a 1x3 matrix. I currently solve this problem for each pixel with the code:
x=A\b; where \ should be mldivide.
THE PROBLEM:
I get negative solutions for x which is impossible since I could never get a negative result in an acquired image. I am out of my element with this problem. I would appreciate any direction towards appropriate functions or related topics that I should look into to solve such an equation as above where solutions for x must be >=0. I have access to every Matlab toolbox through my institution.
  댓글 수: 2
Matt J
Matt J 2013년 11월 4일
So, multiple solutions to A*x=b exist some of which are >=0 and some not? Otherwise, you may have simply constructed A and b incorrectly, such that the only solutions are negative.
Kalen
Kalen 2013년 11월 6일
It usually finds a positive result, but fails sometimes. I was hoping that I may improve my image quality somewhat if those locations were affecting something. Thanks for the advice.

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

채택된 답변

Matt J
Matt J 2013년 11월 4일
편집: Matt J 2013년 11월 4일
You could use LSQNONNEG or LSQLIN.
  댓글 수: 1
Kalen
Kalen 2013년 11월 6일
Thanks! That seems to fix negative values.

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

추가 답변 (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