How can I make logarithmic fitting without using lsqcurvefit function

Hi;
Using following function; I make logarithmic fitting.
fun = @(p,x) p(2)*exp(p(1)*x);
p0 = [1, 1];
p = lsqcurvefit(fun,p0,x,y)
yfit = fun(p,x);
plot(x,yfit)
but I need another approach for another project because I can't use lsqcurvefit function in this project.
Is there any method for making logarithmic fitting without using lsqcurvefit function.

답변 (1개)

Stephan
Stephan 2018년 11월 9일
편집: Stephan 2018년 11월 9일

1 개 추천

Hi,
see this example - it works with the Matlab basic function fminsearch, so that no extra Toolboxes are needed.
Best regards
Stephan

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

태그

질문:

2018년 11월 9일

편집:

2018년 11월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by