How to do curve fitting to a custom function with 7 fitting parameters?

조회 수: 3 (최근 30일)
Shuai Nie
Shuai Nie 2020년 5월 26일
답변: Alan Weiss 2020년 5월 26일
Hi:)
I have 11 sets of measured data (x:Delta_n, y:Tau_base) for different temperatures, I want to fit them using an custom function 'Seff_model1_temp3' (y: TauEff and x: Delta_n). I have 7 fitting parameters (see highlighted part in the code).
By varing temperature (T), I want to fit all 11 sets of data using same fitting paramters.
Can someone help me with the fitting? prefer to use nonlinear least squares. I want to set the upper and lower limit for each fitting parameters as well!
Thanks in advance!!!!
  댓글 수: 1
Star Strider
Star Strider 2020년 5월 26일
You will have to code the objective function yourself. See Anonymous Functions for one way to do that.
Also see the documentation for the optimisation function you want to use, so you can write the function correctly for it.

댓글을 달려면 로그인하십시오.

답변 (1개)

Alan Weiss
Alan Weiss 2020년 5월 26일
There are examples related to this in Nonlinear Data-Fitting and possibly Fit an ODE.
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

Help CenterFile Exchange에서 Least Squares에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by