I want to find the initial parameters for nlinfit, but I do not calculate it!

6 visualizzazioni (ultimi 30 giorni)
Hello,I have one problem,and hope that you can help me , I want to find the initial parameters for nlinfit,I have such set data:
x=[19 22 25 28 31 34],ydata=[0.11737 0.18281 0.23256 0.26596 0.33113 0.28090],xis independent variable,y is dependent variable; model Fun=exp(p(1)*x)-exp(p(1)*p(2)-(p(2)-x)/p(3)); p(1),p(2) and p(3) are coefficients; My problem is that,I do not know how to set the suitable initial guess for parameters. I tried many different sets ,however,I also got different parameters,so ,I hope that you can hope me deal with it ,Thanks a lot.

Risposte (2)

Sean de Wolski
Sean de Wolski il 31 Dic 2013

Amit
Amit il 31 Dic 2013
I think this problem is suffering from a non-unique solution scenario. You are trying to fit 6 data points with 3 coefficient function. I tried plotting your data points and one can fit these data point with a linear function as well with certain confidence.
  2 Commenti
Huaxi
Huaxi il 31 Dic 2013
Thank you very much,I have fitted it with a linear function,the result is very good, but I also want to fit it with some other nonlinear functions, so I have to try it with nonlinear functions, but I do not how to do it, so I want to your help.
Amit
Amit il 31 Dic 2013
Modificato: Amit il 31 Dic 2013
For fitting with a nonlinear function, the use of nlinfit is appropriate. The real issue here is that can you confidently obtain the nonlinearity in the data set you are trying to fit. For example, I have a function y = x^2 which is a non-linear function. I create my data points as
x = 1:10;
y = x.*x + rand(1,10)-0.5; % add a little noise
Now from the plot using first 3 data points, I can fit the function with a linear or a 2nd order function with good confidence. However they both fail from the real function. The point is that you can only fit effectively and confidently your data set with a nonlinear function, if you see significant nonlinearity in you data set. Otherwise, in words of polymath John Neumann 'With four parameters I can fit an elephant, and with five I can make him wiggle his trunk'.

Accedi per commentare.

Categorie

Scopri di più su Global or Multiple Starting Point Search in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by