Differential equations model it does not work

1 回表示 (過去 30 日間)
Dionisio Mendoza
Dionisio Mendoza 2019 年 5 月 13 日
回答済み: Sulaymon Eshkabilov 2019 年 5 月 13 日
I need to make the PDF model of G proteins, try to perform a function introducing the variables and equations, but when trying to run it the graph does not work out like the one in the document (section Example 3.2)
I do not know if I'm wrong about something or I just can not achieve the goal of the model.
The function file is: examenisb
function dydx = examenisb (x,y)
ki = 1;
ku = 1;
global Km1;
global Km2;
V1 = y(2)*ki*x(1)/(Km1+y(2));
V2 = y(1)*ku*x(1)/(Km2+y(1));
dadx = V1-V2;
dbdx = -V1-V2;
dydx = [dadx -dbdx]';
The scrypt file is: perrotrabajo
global Km1;
global Km2;
Km1=.001;
Km2=.001;
[x,y]=ode45(@examenisb,[0,2],[0.1 0.1]);
plot(x,y);
xlabel('tiempo (h)')
ylabel('biomasa')
title('Biomasa')

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019 年 5 月 13 日
Hi,
There are a couple of minor (but essential) flaws, such as x(1) used (presumably) instead of y(1) in V1 and V2. Anyhow, to make this long script short, here is a much shorter script with correections w.r.t x(1) --> y(1).
clearvars; clc;
ki = 1; ku = 1;
Km1=.001; Km2=.001;
dydx = @(x, y)[ y(2)*ki*y(1)/(Km1+y(2))-y(1)*ku*x(1)/(Km2+y(1));(y(2)*ki*y(1)/(Km1+y(2))+y(1)*ku*x(1)/(Km2+y(1)))];
[x,y]=ode45(dydx,[0,2],[0.1 0.1]);
plot(x,y); xlabel('tiempo (h)'); ylabel('biomasa'); title('Biomasa'), grid on
Good luck

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by