How to find the absolute value of ratio?
7 次查看(过去 30 天)
显示 更早的评论
Hi all,
I've previously done curve fitting to able to find constant numerical values of estimate(1) and estimates(2)for mixture AB within a pixel of a image.Now I have to find their relative proportions of A and B with respect to the mixture AB.
I have:
-A+B=1 %Total proportion of A and B within the mixture adds up to 1.
-estimate(1) = A*(1.2) + B*(1.4)
-estimate(2) = A*(2) + B*(2.5)
And if I substitute B=1-A into the other two equations,I simply have this:
-estimate(1)= A*(1.2) + (1-A)*(1.4)-----EQUATION 1
-estimate(2)= A*(2) + (1-A)*(2.5)-------EQUATION 2
So I would like to ask how do I go about calculating the numerical value of A because I do not think that simply by evaluating say equation 1 will give me the accurate value of A which satisfy equation 2.
This is so as estimate(1) and estimate(2) are rough approximations from the curve-fitting graph and value of 1.2,1.4,2 and 2.5 are values which are selected from a range.
Is there such a function to solve this or I need to do on curve fitting again? And how am I going to go about doing that?
Any form of help will be much appreciated !
Best Regards
1 个评论
Image Analyst
2013-2-6
It's a bit difficult to follow. Could you upload images A and B, and the mixture or estimate images?
采纳的回答
John D'Errico
2013-2-6
You have three equations in two unknowns. One might simply try to solve them, but there is too much information. The equations will in general have no unique solution that satisfies all three of them.
What it sounds like you wish though, is to solve equations (2) and (3), subject to the exact equality constraint posed by equation (1). This is a problem solved by LSQLIN, from the optimization toolbox. If you lack that toolbox, then LSE, my tool posted on the File Exchange does it nicely.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!