How to apply curve fitting with a model where y shows up on both sides of the equation.
古いコメントを表示
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.
採用された回答
その他の回答 (2 件)
Sargondjani
2012 年 4 月 7 日
0 投票
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...
カテゴリ
ヘルプ センター および File Exchange で Conversion Between Symbolic and Numeric についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!