MATLAB: How to fit data with a solution of a non linear differential equation containing multiple unknown coefficient

fitlsqcurvefitmultiple parametersnon-linear equationode

Hi everybody,
So it's been quite some time since I have used Matlab and now I have had a hard time figurint out how to proceed with my problem.
So I have measured some data and I would like to fit it with a certain function.
This latter function is found by solving numerically a non linear differential equation with 6 unknown coefficients.
What I want to do is by using a least-squares method (lsqcurvefit) I would vary the 6 unknown coefficients of the non linear ODE so that after the loop routine the solution to this equation fits my data.
And I'm stuck in thinking how to label all this. I understand the examples of the lsqcurvefit but it applies to a function. And I want to apply it to a equation so that the solution fits the data.
Here is the equation with the unknown coefficients a, b1, b2, c1, c2 and d. I aleady have a guess for all these values and a range in which they should lie within.
When I solve this equation numerically in matlab (with certain values), I can plot the function u(t). But what I want to plot and fit is actually .
So in summary: I want to write a routine loop varying my 6 coefficients in my non linear equation in order for the p(t) function to fit my data.
Any suggestion from you guys ?
Thanks a lot.
Best,
Thibaut

Best Answer

In cases like yours, we always refer to
Best wishes
Torsten.