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!