# Differential equations model it does not work

1 view (last 30 days)
Dionisio Mendoza on 13 May 2019
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));
dbdx = -V1-V2;
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')

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