fitting parabolic looking data to an exponential function
이전 댓글 표시
Hello,
I have data which looks like many different parabolas. I would like to fit each parabolic data set to an exponential function and determine if it is cubic quadratic or so.
I tried this
g = fittype('a*exp(b*x)');
f0 = fit(x,y,g,'StartPoint',[0,0,0]);
plot(x,y,'o')
hold on;
plot(f0(xx),'r-');
but it gives me a line. Perhaps something is wrong with my code. Any ideas? :)
답변 (1개)
Matt J
2022년 10월 7일
Nothing is wrong with your code, but I recommend using the built-in 'exp1' model instead, which doesn't require a start point.
f0 = fit(x,y,'exp1');
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!