How to apply curve fitting with a model where y shows up on both sides of the equation.
Show older comments
I have a set of data to fit with the following equation: y=a*(((4*(1-x/b+y/c))^-2)-0.25+x/b-y/c), where x and y are the independent and dependent variables, respectively. Coefficients are a, b, and c. As you see, y shows up on both sides of the equation. I tried to generate this equation in Matlab curve fitting tool box, however, it does not allow y to be on the right side of the equation. Do you have any idea how to apply this equation to fit the data? Thanks ahead.
Accepted Answer
More Answers (2)
Sargondjani
on 7 Apr 2012
0 votes
i know how you could get your a, b and c using lsqnonlin (minimizing least squares), but im not sure if the statistical properpties are what you want them to be
to do it with lsqnonlin you would have to write a function in the format: F(par,x,y)= y - (right hand side); %this should return a vector with the residuals, where par is a vector with [a,b,c], so par(1) instead of 'a', etc.
then optimize: [par]=lsqnonlin(function,par0);
i suppose there is nicer way to do it, but this could get you started...
Zhongbo
on 7 Apr 2012
0 votes
Categories
Find more on Conversion Between Symbolic and Numeric in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!