I want to fit some data x and y to a specific equation f(x) and then estimate this fitted data as g(x)=1/f(x) ?

1 次查看(过去 30 天)
x=[0,0.5,1,1.5,2,2.5];
y=[1,0.8,0.6,0.4,0.2,0];
F(x)= exp[(a*x^2)+(b*x)+c], where a,b,c are not known to me
after fitting this data to this equation i want to get g(x)=1/f(x). The picture attached below demonstrates what we are trying to do. Figure A shows x and y fitted to f(x) and figure B shows estimated g(x)=1/f(x).

采纳的回答

Ameer Hamza
Ameer Hamza 2018-4-30
Using Curve Fitting toolbox , it is quite easy to fit the curve.
fitFunction = fittype('exp(a*x.^2+b*x+c)');
coff = fit(x', y', fitFunction);
a = coff.a;
b = coff.b;
c = coff.c;
  18 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by