How does MATLAB calculate the jacobian of a function that does not have an expression in lsqnonlin?

조회 수: 3 (최근 30일)
I'm using Lsqnonlin to do curve fitting and get parameters.
A quick overveiw of the problem: I have a Numerical DiffEq solver (in the form of a mex file) that is operated through MATLAB, a function blackboxfunction(A,t, X). The DiffEq solver provides my 'model' data (from theory).
We perform experients with known experimental values 'A' and for a known time from 0 to t.
X are parameters that are unknown, but can be obtained by inverse fitting the 'model' data to the 'experimental' data. Both experimental and model data are plotted in the form of curves.
This is essentially a non-convex optimization problem: What are the parameters (X) such that the function @(X)blackboxfunction(A,t,X) - y_experimental(t) is minimized.
In other words - what parameters 'X' gets the experimental and model curves to overlap perfectly?
___
Now, during the optimization itself, I'm having some issues with the confidence intervals, but before I get into troubleshooting that I would like to know how MATLAB obtains estimates of the jacobian for such a function?
Does the jacobian depend on values of 'FiniteDifferenceStepSize' in optimoptions? How so?
__
My problem is that my confidence intervals are all over the place - some are too narrow (values outside the CIs give reasonable fits, visually) and some are too wide (values inside the CIs give reasonable fits). Any advice is welcome!

답변 (1개)

Alan Weiss
Alan Weiss 2020년 7월 6일
It is possible that the examples Fit ODE, Problem-Based or Fit an Ordinary Differential Equation (ODE) would show you reasonable ways of accomplishing your goal. If you really want to know the underlying algorithms, look at Least Squares (Model Fitting) Algorithms.
Alan Weiss
MATLAB mathematical toolbox documentation

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by