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

3 次查看(过去 30 天)
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

回答(1 个)

Mischa Kim
Mischa Kim 2014-2-14
编辑:Mischa Kim 2014-2-14
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));

类别

Help CenterFile Exchange 中查找有关 Curve Fitting Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by