How to adjust parameters in a ode?

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!

 Respuesta aceptada

David Goodmanson
David Goodmanson el 10 de Jul. de 2017
Editada: David Goodmanson el 10 de Jul. de 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.

Más respuestas (0)

Preguntada:

el 10 de Jul. de 2017

Comentada:

el 2 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by