expected value of 'exp2' fit for an unavailable data point using available data

2 visualizaciones (últimos 30 días)
I have a data set containing 6 values for x and 6 values y. x = 0, 15, 35, 50, 65, 85 and y= 1.2, 1.2 ,1.3, 2.3, 2.1, 4.0. The sum of exponential functions ('exp2') fit to them very well. How can I calculate the expected value for instance for x= 100. I mean what is y for x=100 given the available data and fit functions? I d be very appreciative. Thanks

Respuestas (1)

Mischa Kim
Mischa Kim el 14 de Feb. de 2014
Editada: Mischa Kim el 14 de Feb. de 2014
Hello Mohammad, you can retrieve the curve fitting parameters using coeffvalues, define an anonymous function, and then evaluate that function at any point you'd like:
curve = fit(x,y,'exp2');
coeffs = coeffvalues(curve);
f_fit = @(x) (coeffs(1)*exp(coeffs(2)*x) + coeffs(3)*exp(coeffs(4)*x));

Categorías

Más información sobre 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!

Translated by