expected value of 'exp2' fit for an unavailable data point using available data
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposte (1)
Mischa Kim
il 14 Feb 2014
Modificato: Mischa Kim
il 14 Feb 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));
Vedere anche
Categorie
Scopri di più su Curve Fitting Toolbox 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!