% MATLAB code for Bi250b
% written by Emmanuel Lorenzo de los Santos, January 17, 2012

clear all
clc

Kxz=.5;Kxy=.5;Kyz=.5;beta_x=1;beta_basal=.1;

% These will set up a plot comparing 3 different values of Kxz
% Enter Kxz values here
Kxz1 = 
Kxz2 = 
Kxz3 = 
[t1,c1] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz1,Kxy,Kyz,beta_x,beta_basal);
[t2,c2] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz2,Kxy,Kyz,beta_x,beta_basal);
[t3,c3] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz3,Kxy,Kyz,beta_x,beta_basal);

figure()
plot(t1,c1(:,3),t2,c2(:,3),t3,c3(:,3))
xlabel('Time')
ylabel('Concentration')
legend('K_{xz} 1','K_{xz} 2','K_{xz} 3')
title('Concentration of Z vs. time')

% These will set up a plot comparing 3 different values of Kxy
Kxy1 = 
Kxy2 = 
Kxy3 = 
[t1,c1] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy1,Kyz,beta_x,beta_basal);
[t2,c2] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy2,Kyz,beta_x,beta_basal);
[t3,c3] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy3,Kyz,beta_x,beta_basal);

figure()
plot(t1,c1(:,3),t2,c2(:,3),t3,c3(:,3))
xlabel('Time')
ylabel('Concentration')
legend('K_{xy} 1','K_{xy} 2','K_{xy} 3')
title('Concentration of Z vs. time')

% These will set up a plot comparing 3 different values of Kyz
Kyz1 = 
Kyz2 = 
Kyz3 = 
[t1,c1] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy,Kyz1,beta_x,beta_basal);
[t2,c2] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy,Kyz2,beta_x,beta_basal);
[t3,c3] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy,Kyz3,beta_x,beta_basal);

figure()
plot(t1,c1(:,3),t2,c2(:,3),t3,c3(:,3))
xlabel('Time')
ylabel('Concentration')
legend('K_{yz} 1','K_{yz} 2','K_{yz} 3')
title('Concentration of Z vs. time')

% These will set up a plot comparing 3 different values beta
beta1 = 
beta2 = 
beta3 = 
[t1,c1] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy,Kyz,beta1,beta_basal);
[t2,c2] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy,Kyz,beta2,beta_basal);
[t3,c3] = ode45('prob1',0:.005:10,[0,0,0],[],Kxz,Kxy,Kyz,beta3,beta_basal);

figure()
plot(t1,c1(:,3),t2,c2(:,3),t3,c3(:,3))
xlabel('Time')
ylabel('Concentration')
legend('\beta 1','\beta 2','\beta 3')
title('Concentration of Z vs. time')