I actually meant syntax-wise. I know what values I would like to use as start points, but how can I implement them in my code?
Setting your own start points for curve fitting
121 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
J.S.
el 27 de Jun. de 2018
Respondida: Walter Roberson
el 27 de Jun. de 2018
I have a set of data which I am attempting to fit via a modified ("custom") two-exponential function: a*exp(b*(x-x0))+c*exp(d*(x-x0))+y0, where x0 and y0 are known. I know how to set upper and lower bounds for a,b,c,d, but how can I specify starting values (start points) for them?
Thanks in advance.
3 comentarios
Adam Danz
el 27 de Jun. de 2018
Editada: Adam Danz
el 27 de Jun. de 2018
I see, what function are you using to do the fitting? For most of matlab's fitting functions, the 2nd input is "x0" which is a vector of values [1-by-n] for the n parameters of the function you're fitting. If the parameters in your function are [a,b,c,d] with an expected outcome of [100, 20, .5, -2], then that vector would be the input to 'x0'.
Respuesta aceptada
Walter Roberson
el 27 de Jun. de 2018
If you are using fit() then use the InitialPoint option as shown in https://www.mathworks.com/help/curvefit/fit.html#bto2vuv-10
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!