I have an equation like this:
dy/dt = alpha * x(t)
The function x(t) is known and I have experimental data for dy/dt.
How can I find the value of alpha adjusting the equation to the experimental data?
Thank you!

 Réponse acceptée

David Goodmanson
David Goodmanson le 10 Juil 2017
Modifié(e) : David Goodmanson le 10 Juil 2017
Hi Sara
Since you have a single multiplicative parameter, certainly the simplest way is,
create a column vector dydt of your data
create a column vector t of corresponding experimental times
then
prediction = x(t) % assuming x can accept a vector and produce a vector
alpha = prediction\dydt
This works since
alpha x(t) = dy/dt
is a set of n linear equations and one unknown, so Matlab finds a least square solution for alpha. Of course this only works if dydt and the prediction x(t) have some sensible relation to each other, i.e. basically the same shape. More sophisticated solutions are probably possible but this is worth trying first.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by