Differential equations model it does not work
1 view (last 30 days)
Show older comments
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')
0 Comments
Answers (1)
Sulaymon Eshkabilov
on 13 May 2019
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
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!