DIfferential equation (ODE)
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hy everyone!
I would like to make mathematical modelling in MATLAB, but I can't get my head around it. So here it is the equation:
dc/dt = -r
-r = (kreac*Kads*(c))/(1+Kads*(c))
c(0)=125 micromol
Kads = 4.45*10^-2
kreac = 2.06*10^-2
t(0) = 0
t(f) = 120
How can I solve this in MATLAB?
2 comentarios
John D'Errico
el 24 de Ag. de 2017
Editada: John D'Errico
el 24 de Ag. de 2017
What have you tried? Have you tried dsolve? ode45? If nothing, then why not make an effort? This is a basic ODE problem. Take a shot at it. Read the help for those tools. Look at the examples. Show what you tried, and ask what you did wrong. You will get more help if you show a willingness to make an effort than if you just post a doit4me.
Respuestas (1)
Ennio Condoleo
el 26 de Ag. de 2017
Hey, I would like to propose you a hint. This is a classical problem to be solved by using ODE. Let's assume the following differential equation at first order:
dc/dt = (k1*k2*c)/(1+k2*c)
where k1 and k2 are real values. The initial condition c = c0 is assigned at t = t0. The final time of integration is t = tf.
A fast solution to this issue is:
odeOptions = odeset('RelTol',1e-6,'AbsTol',1e-8);
t0 = 0;
tf = 120;
c0 = 125;
k1 = 2.06e-2;
k2 = 4.45e-2;
[t,c] = ode45(@myfun,[t0,tf],c0,odeOptions,k1,k2);
plot(t,c);
where "myfun" is a function as:
function [c] = myfun(t,c,k1,k2)
c = (k1*k2*c)/(1+k2*c);
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!