System of three differential equations

Hello I can't solve this problem in Matlab. I have system of three differencial equations:
1) dS/dt= -r*S*I
2) dI/dt= r*S*I - a*i
3) dR/dt = a*I
where a and r are not time dependent and we are searching for their values. I have three vectors with the data for S, I and R. So i need to fint a and r.
Can someone tell me some code about this. I would be gratefull. Thank you !

7 comentarios

Sargondjani
Sargondjani el 13 de Jun. de 2012
i actually know nothing about solving differential equations, but you might want to look at the 'ODE' solvers
vasil enchev
vasil enchev el 13 de Jun. de 2012
I looked at them first. There is something like:
syms x y(t)
but there is an error this syms x(t) is not recognizable.
Walter Roberson
Walter Roberson el 13 de Jun. de 2012
Which MATLAB version are you using?
vasil enchev
vasil enchev el 13 de Jun. de 2012
well.. 7 and something I think
Walter Roberson
Walter Roberson el 13 de Jun. de 2012
There have been a lot of changes over the "7" series, which dates back over 5 years. Could you be more specific? There have been notable changes in the symbolic toolbox.
Walter Roberson
Walter Roberson el 13 de Jun. de 2012
There have been a lot of changes over the "7" series, which dates back over 5 years. Could you be more specific? There have been notable changes in the symbolic toolbox.
vasil enchev
vasil enchev el 13 de Jun. de 2012
It is 7.8.0... is it OK?

Iniciar sesión para comentar.

Respuestas (1)

Teja Muppirala
Teja Muppirala el 13 de Jun. de 2012

0 votos

So you have experimental data (S(t),I(t), and R(t)), and you are trying to find the parameters (a and r) that will make the ODE match your data, is that right? If so, I think this is the general idea : http://www.mathworks.co.jp/matlabcentral/answers/5054-solving-an-ode-with-best-fit-adjustment-to-empirical-observations

1 comentario

vasil enchev
vasil enchev el 13 de Jun. de 2012
Well no it isn't this I have a system of 3 equation and this is only for one...

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 13 de Jun. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by