Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Chris Rowland
- %% BALLER CODE!!!
- %% Parameters
- clear all; clf;
- options = [];
- tspan = linspace(0, 30, 1000); % Th%% PART 4!!!
- %e reaction lasts 30 minutes
- %% Solves the differential equations
- [t1,y] = ode45(@DiffEQ, tspan, [0, 0.5*10^5, 0, 23357, 0], options); % Part 2
- [t , x] = ode45(@DiffEQ, tspan, [5*10^-12, 0.5*10^5, 0, 23357, 0], options); % Part 3
- [t5,x1] = ode45(@DiffEQ1, tspan, [5*10^-12, 0.5*10^5, 0, 23357, 0], options); % Part 3
- [t6,x2] = ode45(@DiffEQ2, tspan, [5*10^-12, 0.5*10^5, 0, 23357, 0], options); % Part 3
- [t2,z] = ode45(@DiffEQ, tspan, [2.5*10^-11, 0.5*10^5, 0, 23357, 0], options); % Part 4
- [t3,w] = ode45(@DiffEQ, tspan, [7*10^-10, 0.5*10^5, 0, 23357, 0], options); % Part 4
- [t4,v] = ode45(@DiffEQ, tspan, [5*10^-9, 0.5*10^5, 0, 23357, 0], options); % Part 4
- %% PART 2!!!
- figure(1)
- subplot(3,2,1)
- plot(t1, y(:,1),'k','LineWidth', 2)
- title('Free Ligand Concentration versus Time (CL = 0)', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Ligand Concentration', 'FontSize',12)
- axis([0 30 4.95*10^-12 5.1*10^-12])
- subplot(3,2,2)
- plot(t1, y(:,2),'b','LineWidth', 2)
- title('Free Surface Recepors versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Number of Surface Receptors', 'FontSize',12)
- axis([0 30 0 6*10^4])
- subplot(3,2,3)
- plot(t1, y(:,3),'r','LineWidth', 2)
- title('Complex Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Complex Concentration', 'FontSize',12)
- axis([0 30 0 40])
- subplot(3,2,4)
- plot(t1, y(:,4),'g','LineWidth', 2)
- title('Intracellular Receptor Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Intracellular Receptor Concentration', 'FontSize',12)
- axis([0 30 0 30000])
- subplot(3,2,5)
- plot(t1, y(:,5),'y','LineWidth', 2)
- title('Intracellular Ligand Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Intracellular Ligand Concentration', 'FontSize',12)
- axis([0 30 0 200])
- %% PART 3!!!
- figure(2)
- subplot(3,2,1)
- plot(t, x(:,1),'k',t5, x1(:,1),'b',t6, x2(:,1),'r','LineWidth', 2)
- legend('NC = 10.5^8','NC = 10.5^5','NC = 10.5^11', 'location','northeast')
- title('Free Ligand Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Ligand Concentration', 'FontSize',12)
- axis([0 30 4.95*10^-12 5*10^-12])
- subplot(3,2,2)
- plot(t, x(:,2),'k',t5, x1(:,2),'b',t6, x2(:,2),'r','LineWidth', 2)
- legend('NC = 10.5^8','NC = 10.5^5','NC = 10.5^11', 'location','southeast')
- title('Free Surface Recepors versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Number of Surface Receptors', 'FontSize',12)
- axis auto
- subplot(3,2,3)
- plot(t, x(:,3),'k',t5, x1(:,3),'b',t6, x2(:,3),'r','LineWidth', 2)
- legend('NC = 10.5^8','NC = 10.5^5','NC = 10.5^11', 'location','southeast')
- title('Complex Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Complex Concentration', 'FontSize',12)
- axis auto
- subplot(3,2,4)
- plot(t, x(:,4),'k',t5, x1(:,4),'b', t6, x2(:,4),'r','LineWidth', 2)
- legend('NC = 10.5^8','NC = 10.5^5','NC = 10.5^11', 'location','southeast')
- title('Intracellular Receptor Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Intracellular Receptor Concentration', 'FontSize',12)
- axis auto
- subplot(3,2,5)
- plot(t, x(:,5),'k',t5, x1(:,5),'b',t6, x2(:,5),'r','LineWidth', 2)
- legend('NC = 10.5^8','NC = 10.5^5','NC = 10.5^11', 'location','northwest')
- title('Intracellular Ligand Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Intracellular Ligand Concentration', 'FontSize',12)
- axis auto
- %% PART 4!!!
- figure(3)
- subplot(3,2,1)
- plot(t2, z(:,1),'k',t3, w(:,1),'b',t4, v(:,1),'r','LineWidth', 2)
- legend('2.5*10^-11','7*10^-10','5*10^-9', 'location','northeast')
- title('Free Ligand Concentration versus Time (NC = 10.5^8)', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Ligand Concentration', 'FontSize',12)
- axis([0 30 0 6*10^-9])
- subplot(3,2,2)
- plot(t2, z(:,2),'k',t3, w(:,2),'b',t4, v(:,2),'r','LineWidth', 2)
- legend('2.5*10^-11','7*10^-10','5*10^-9', 'location','northeast')
- title('Free Surface Recepors versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Number of Surface Receptors', 'FontSize',12)
- axis([0 30 0 6*10^4])
- subplot(3,2,3)
- plot(t2, z(:,3),'k',t3, w(:,3),'b',t4, v(:,3),'r','LineWidth', 2)
- legend('2.5*10^-11','7*10^-10','5*10^-9', 'location','northeast')
- title('Complex Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Complex Concentration', 'FontSize',12)
- axis([0 30 0 20000])
- subplot(3,2,4)
- plot(t2, z(:,4),'k',t3, w(:,4),'b',t4, v(:,4),'r','LineWidth', 2)
- legend('2.5*10^-11','7*10^-10','5*10^-9', 'location','southeast')
- title('Intracellular Receptor Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Intracellular Receptor Concentration', 'FontSize',12)
- axis([0 30 0 60000])
- subplot(3,2,5)
- plot(t2, z(:,5),'k',t3, w(:,5),'b',t4, v(:,5),'r','LineWidth', 2)
- legend('2.5*10^-11','7*10^-10','5*10^-9', 'location','northwest')
- title('Intracellular Ligand Concentration versus Time', 'FontSize',12)
- xlabel('Time (min)', 'FontSize',12)
- ylabel('Intracellular Ligand Concentration', 'FontSize',12)
- axis([0 30 0 60000])
- DIFFEQ____________________________________________________
- %% Chris Rowland
- %% DiffEQ.m
- function dxdt = f(t, x);
- %% Parameters
- k1 = 7.2*10^7; % 1/M 1/min
- kr1 = 0.3; % 1/min
- ker = 0.03; % 1/min
- kec = 0.3; % 1/min
- krec = 0.08; % 1/min
- kdegr = 0.0011; % 1/min
- kdegl = 0.01; % 1/min
- fr = 0.2; %
- fl = 0.6; %
- nc = 10.5^8; % 1/L
- nri = 23357; % #
- Vs =5.14; % M/s
- NA = 6.0221415*10^23; % Avegadros number
- dxdt=zeros(5,1); % column vector, creates vector fo DIFFY Qs
- dxdt(1) = (nc/NA).*(-k1.*x(1).*x(2) + kr1*x(3) + krec*(1-fl)*x(5));
- dxdt(2) = -k1*x(1).*x(2)+ kr1*x(3)-ker*x(2)+krec*(1-fr)*x(4)+Vs;
- dxdt(3) = k1*x(1).*x(2)-(kr1+kec)*x(3);
- dxdt(4) = ker*x(2)+kec*x(3)-(kdegr*fr+krec*(1-fr))*x(4);
- dxdt(5) = kec*x(3)-(kdegl*fl+krec*(1-fl))*x(5);
- DIFFEQ1______________________________________________________________________
- %% Chris Rowland
- %% DiffEQ.m
- function dxdt = f(t, x);
- %% Parameters
- k1 = 7.2*10^7; % 1/M 1/min
- kr1 = 0.3; % 1/min
- ker = 0.03; % 1/min
- kec = 0.3; % 1/min
- krec = 0.08; % 1/min
- kdegr = 0.0011; % 1/min
- kdegl = 0.01; % 1/min
- fr = 0.2; %
- fl = 0.6; %
- nc = 10.5^5; % 1/L
- nri = 23357; % #
- Vs =5.14; % M/s
- NA = 6.0221415*10^23; % Avegadros number
- dxdt=zeros(5,1); % column vector, creates vector fo DIFFY Qs
- dxdt(1) = (nc/NA).*(-k1.*x(1).*x(2) + kr1*x(3) + krec*(1-fl)*x(5));
- dxdt(2) = -k1*x(1).*x(2)+ kr1*x(3)-ker*x(2)+krec*(1-fr)*x(4)+Vs;
- dxdt(3) = k1*x(1).*x(2)-(kr1+kec)*x(3);
- dxdt(4) = ker*x(2)+kec*x(3)-(kdegr*fr+krec*(1-fr))*x(4);
- dxdt(5) = kec*x(3)-(kdegl*fl+krec*(1-fl))*x(5);
- DIFFEQ2____________________________________
- %% Chris Rowland
- %% DiffEQ.m
- function dxdt = f(t, x);
- %% Parameters
- k1 = 7.2*10^7; % 1/M 1/min
- kr1 = 0.3; % 1/min
- ker = 0.03; % 1/min
- kec = 0.3; % 1/min
- krec = 0.08; % 1/min
- kdegr = 0.0011; % 1/min
- kdegl = 0.01; % 1/min
- fr = 0.2; %
- fl = 0.6; %
- nc = 10.5^11; % 1/L
- nri = 23357; % #
- Vs =5.14; % M/s
- NA = 6.0221415*10^23; % Avegadros number
- dxdt=zeros(5,1); % column vector, creates vector fo DIFFY Qs
- dxdt(1) = (nc/NA).*(-k1.*x(1).*x(2) + kr1*x(3) + krec*(1-fl)*x(5));
- dxdt(2) = -k1*x(1).*x(2)+ kr1*x(3)-ker*x(2)+krec*(1-fr)*x(4)+Vs;
- dxdt(3) = k1*x(1).*x(2)-(kr1+kec)*x(3);
- dxdt(4) = ker*x(2)+kec*x(3)-(kdegr*fr+krec*(1-fr))*x(4);
- dxdt(5) = kec*x(3)-(kdegl*fl+krec*(1-fl))*x(5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement