Equation solver
%global gammaGR mGRIR mCC deltaGRI alfaR deltaR deltaCC betaCC k n deltaS H
%
%
gammaGR= 0.1; %Diffussion rate of glucocorticoid inside the cell (mm/min)
mGRIR=1.080e-3; % GRI-R complex formation kinetic constant (1/umol min)
mCC=1.14*10^-8; %GRI-R Complex formation reverse kinetic constant (1/min)
deltaGRI=0.00833; %Glucocorticoids Destruction rate inside the cell (1/min)
alfaR= 0.8e3; %Basal production rate of the receptor (umol/min)
deltaR=0.004166; %Receptor destruction rate inside the cell (1/min)
deltaCC=0.004166; % GRI-R complex Destruction rate (1/min)
betaCC=0.5e3; % GRI-R complex maximum expression rate (umol/min)
k=0.05e3; %Hill's constant for the GRI-R complex dimmer binding to his respective region (umol)
n=2; %Hill coefficient (cooperation constant)
deltaS=0.04166; %Signal destruction rate (1/min)
H=2; %Correction constant for the signal
%
%
%
h=60; %maximum time
m=0.01; %step length [s]
t=0:m:h; %time vector
%
xi=[0 0 0 0];
%
y=fsolve(@CondIndGluco,xi,optimset('algorithm','levenberg-marquardt','maxiter',100000,'tolfun',1e-9));
%
conInd=y;
assignin('base','conInd',conInd);
l=(0:m:h)'; %Vector de tiempo
%
x=zeros(length(l),length(conInd)); %Matriz de variables, en las columnas varia
%la variable y en las filas varia el tiempo
%
GRO=zeros(1,length(l));
%
x(1,:)=conInd;
%
for u=1:length(l)-1
%
xk=x(u,:); %Takes the last position of the matrix (i.e. the actual values of the variables)
%
% k1=EcuacionesGluco(l(u),xk); %first slope of the RK4 method
% k2=EcuacionesGluco(l(u)+m/2,xk+(m/2*k1)'); %second slope of the RK4 method
% k3=EcuacionesGluco(l(u)+m/2,xk+(m/2*k2)'); %third slope of the RK4 method
% k4=EcuacionesGluco(l(u)+m,xk+(m*k3)'); %ffourth slope of the RK4 method
%
% xk1=xk+m/6*(k1+2*k2+2*k3+k4)'; %new vectors for the variables
%
%
% xk2=zeros(1,length(xk1));
%
%
% for p=1:length(xk1)
%
% if(xk1(p)<0.00000001)
%
% xk2(p)=0;
% else
%
% xk2(p)=xk1(p);
% end
%
% end
%
%
% x(u+1,:)=xk2; %Actualization of the new vector of variables int the martrix
%
%
%
%
%
end
%
for j=1:length(l)
%
% if (l(j)<(10) || l(j)>(30))
%
% GRO(j)=155;
%
% else
%
% GRO(j)=155*1.3;
%
%
% end
%
%
end
%
GRI=x(:,1);
R=x(:,2);
CC=x(:,3);
V=x(:,4);
%
%
figure(1)
plot(l,R)%,l,GRO)%,l,CC,l,V)
legend('Receptor')%,'Glucocorticoid') %, 'Complex', 'Signal')
xlabel('Time')
ylabel('Concetration (micromolar)')
title('Glucocorticoid model')
%
figure(2)
plot(l,CC)%,l,GRO)
legend('Complejo')%,'Glucocorticoid')
%
figure(3)
plot(l,V)%,l,GRO)
legend('Senal')%,'Glucocorticoid')
%
figure(4)
plot(l,GRI)%,l,GRO)
legend('GRI')%,'Glucocorticoid')
%