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

3 ビュー (過去 30 日間)
Mohammad Abdolrahmani
Mohammad Abdolrahmani 2014 年 2 月 14 日
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 Center および File ExchangeCurve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by