How to find the absolute value of ratio?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Image Analyst
am 6 Feb. 2013
It's a bit difficult to follow. Could you upload images A and B, and the mixture or estimate images?
Akzeptierte Antwort
John D'Errico
am 6 Feb. 2013
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Least Squares finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!