DIfferential equation (ODE)

조회 수: 6 (최근 30일)
István Székely
István Székely 2017년 8월 24일
댓글: István Székely 2017년 8월 26일
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
John D'Errico
John D'Errico 2017년 8월 24일
편집: John D'Errico 2017년 8월 24일
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.
István Székely
István Székely 2017년 8월 26일
You are right. I have tried dsolve and ode45 also, but I was not able to run the script. I have used Polymath also, there I had success, but limited success.

댓글을 달려면 로그인하십시오.

답변 (1개)

Ennio Condoleo
Ennio Condoleo 2017년 8월 26일
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);

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by