Difference between revisions of "Team:Dundee/Modeling/Appendix1"

Line 73: Line 73:
 
           <a href="#Saliva_code" class="scroll"><span class="glyphicon glyphicon-tint" type="button"></span></a>  
 
           <a href="#Saliva_code" class="scroll"><span class="glyphicon glyphicon-tint" type="button"></span></a>  
 
           <h3>Saliva</h3>
 
           <h3>Saliva</h3>
           <p class="about-content">MATLAB code for Lactoferrin and Lactoferrim Binding Protein binding.</p>
+
           <p class="about-content">MATLAB code for Lactoferrin and Lactoferrin Binding Protein binding.</p>
 
         </div>
 
         </div>
 
<div class="col-md-3">
 
<div class="col-md-3">
Line 123: Line 123:
  
 
<div class="content"><pre class="codeinput">
 
<div class="content"><pre class="codeinput">
   <span class="comment"><h2>MATLAB code from haptosen.m file</h2>%Function to define the non-dimensionalised system of ODEs describing the</span>
+
   <span class="comment"><h2>MATLAB code from haptosen.m file</h2><b>%Function to define the non-dimensionalised system of ODEs describing the binding between Haptoglobin and Haemoglobin.</b></span>
<span class="comment">%binding between Haptoglobin and Haemoglobin. u is a 4 dimensional vector</span>
+
<span class="comment">% u is a 4 dimensional vector</span>
 
<span class="comment">%where;</span>
 
<span class="comment">%where;</span>
 
<span class="comment">% u(1)=Hp (Haptoglobin concentration)</span>
 
<span class="comment">% u(1)=Hp (Haptoglobin concentration)</span>
Line 149: Line 149:
  
  
   <span class="comment"> <h2>MATLAB code from run_haptosen.m file</h2>File to perform sensitivity analysis for Haptoglobin and Haemoglobin</span>
+
   <span class="comment"> <h2>MATLAB code from run_haptosen.m file</h2><b>File to perform sensitivity analysis for Haptoglobin and Haemoglobin binding model.</b></span>
<span class="comment">% binding model.</span>
+
 
 
<span class="comment">% a is the number of values chosen for each of the ranges of parameters.</span>
 
<span class="comment">% a is the number of values chosen for each of the ranges of parameters.</span>
 
<span class="comment">% Therefore 100 different values were chosen.</span>
 
<span class="comment">% Therefore 100 different values were chosen.</span>
Line 237: Line 237:
 
       </div>
 
       </div>
 
     </section>
 
     </section>
<div class="content"><pre class="codeinput"><span class="comment"><h2>MATLAB code from spermsen.m file.</h2>%Function to define the non-dimensionalised system of ODEs describing the</span>
+
<div class="content"><pre class="codeinput"><span class="comment"><h2>MATLAB code from spermsen.m file.</h2><b>%Function to define the non-dimensionalised system of ODEs describing the binding between Spermidine and PotD.</b></span>
<span class="comment">%binding between Spermidine and PotD. u is a 3 dimensional vector</span>
+
<span class="comment">% u is a 3 dimensional vector</span>
 
<span class="comment">%where;</span>
 
<span class="comment">%where;</span>
 
<span class="comment">% u(1)= P (PotD Concentration),</span>
 
<span class="comment">% u(1)= P (PotD Concentration),</span>
Line 258: Line 258:
  
  
<span class="comment">%<h2>MATLAB code for run_spermsen.m file.</h2><b>%%Section 1: File to perform sensitivity analysis for PotD and Spermidine binding model.This section runs the analysis on both the binding parameter kappa</b></span>
+
<span class="comment">%<h2>MATLAB code for run_spermsen.m file.</h2><b>%%Section 1: File to perform sensitivity analysis for PotD and Spermidine binding model.</b></span>
<span class="comment">%and the ratio between PotD and Spermidine, u0.</span>
+
<span class="comment">% This section runs the analysis on both the binding parameter kappa and the ratio between PotD and Spermidine, u0.</span>
 
<span class="comment">% a is the number of datapoints in the range for both kappa and u0, chosen to be 50.</span>
 
<span class="comment">% a is the number of datapoints in the range for both kappa and u0, chosen to be 50.</span>
 
a=50;
 
a=50;
Line 295: Line 295:
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
<span class="comment">%%Section 2: This section is used to plot only u0 against complex concentration over time.</span>
+
<span class="comment"><b>%%Section 2: This section is used to plot only u0 against complex concentration over time.</b></span>
 
<span class="comment">% a is the number of datapoints in the range for u0, chosen to be 50.</span>
 
<span class="comment">% a is the number of datapoints in the range for u0, chosen to be 50.</span>
 
a=50;
 
a=50;
Line 324: Line 324:
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
<span class="comment"><b>%%Section 3: This section is used to plot only kappa against complex concentration over time.</b> a is the number of datapoints in the range for kappa, chosen to be 50.</span>a=50;
+
<span class="comment"><b>%%Section 3: This section is used to plot only kappa against complex concentration over time.</b></span>
 +
<span class="comment">% a is the number of datapoints in the range for kappa, chosen to be 50.</span>
 +
a=50;
 
<span class="comment">% kappa1 is the range of values for kappa that the system will be solved over,</span>
 
<span class="comment">% kappa1 is the range of values for kappa that the system will be solved over,</span>
 
<span class="comment">% where the max is twice the expected value.</span>
 
<span class="comment">% where the max is twice the expected value.</span>
Line 411: Line 413:
 
     </section>
 
     </section>
  
<div class="content"><pre class="codeinput"><span class="comment"><h2>MATLAB code from obp.m file</h2>%Function to define the non-dimensionalised system of ODEs describing the</span>
+
<div class="content"><pre class="codeinput"><span class="comment"><h2>MATLAB code from obp.m file</h2><b>%Function to define the non-dimensionalised system of ODEs describing the folding of the Oderant Binding Protein (OBP).</b></span>
<span class="comment">%folding of the Oderant Binding Protein (OBP). u is a 3 dimensional vector</span>
+
<span class="comment">% u is a 3 dimensional vector</span>
 
<span class="comment">%where;</span>
 
<span class="comment">%where;</span>
 
<span class="comment">% u(1)= alpha (Alpha Helix Concentration),</span>
 
<span class="comment">% u(1)= alpha (Alpha Helix Concentration),</span>
Line 435: Line 437:
  
  
<span class="comment"><h2>MATLAB code for run_obp.m file.</h2>%%File to perform sensitivity analysis for OBP folding model. Section 1: This section runs sensitivity analysis for both the parameter psi (K) and the ratio between beta barrels and alpha helices, D_{0} (v0). a is the number of datapoints in the range for both K and v0, chosen to be 50.</span>
+
<span class="comment"><h2>MATLAB code for run_obp.m file.</h2><b>%%File to perform sensitivity analysis for OBP folding model. Section 1: This section runs sensitivity analysis for both the parameter psi (K) and the ratio between beta barrels and alpha helices, D_{0} (v0).</b></span>
 +
<span class="comment"> a is the number of datapoints in the range for both K and v0, chosen to be 50.</span>
 
a=50;
 
a=50;
 
<span class="comment">% K is the range of values for K that the system will be solved over, where</span>
 
<span class="comment">% K is the range of values for K that the system will be solved over, where</span>
Line 473: Line 476:
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
<span class="comment">%%Section 2: This section is used to plot only v0 against complex concentration over time.</span>
+
<span class="comment"><b>%%Section 2: This section is used to plot only v0 against complex concentration over time.</b></span>
 
<span class="comment">a is the number of datapoints in the range for v0, chosen to be 50.</span>
 
<span class="comment">a is the number of datapoints in the range for v0, chosen to be 50.</span>
 
a=50;
 
a=50;
Line 513: Line 516:
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
 
<span class="comment">%</span>
<span class="comment">%%Section 3: This section is used to plot only K against folded OBP over time.</span>
+
<span class="comment"><b>%%Section 3: This section is used to plot only K against folded OBP over time.</b></span>
 
<span class="comment">% a is the number of datapoints in the range for K, chosen to be 50.</span>
 
<span class="comment">% a is the number of datapoints in the range for K, chosen to be 50.</span>
 
a=50;
 
a=50;

Revision as of 10:08, 10 August 2015

Appendix 1

BioSpray Code

Blood

MATLAB code for Haemoglobin and Haptoglobin binding.

Semen

MATLAB code for Spermidine and PotD binding.

Saliva

MATLAB code for Lactoferrin and Lactoferrin Binding Protein binding.

Nasal Mucus

MATLAB code for Oderant Binding Protein folding.

Blood: Haptoglobin and Haemoglobin Binding MATLAB Code

Before using MATLAB the original system of equations was non-dimensionalised to the system:

$$ \begin{eqnarray*} \frac{dHp}{d\tau}&=&[Hp\cdot \alpha_{H}]-\lambda Hp \alpha_{H},\\ \frac{d\alpha_{H}}{d\tau}&=&[Hp\cdot \alpha_{H}]-\lambda Hp \alpha_{H},\\ \frac{d[Hp \cdot \alpha_{H}]}{d\tau}&=&\lambda Hp \alpha_{H}-[Hp \cdot \alpha_{H}]-\gamma [Hp \cdot \alpha_{H}],\\ \frac{d[Hp \cdot \alpha_{H} \cdot \beta_{H}]}{d\tau}&=&\gamma [Hp \cdot \alpha_{H}]. \end{eqnarray*} $$

The initial conditions were also non-dimensionalised to become:

$$ \begin{eqnarray*} Hp(0)&=&4.17,\\ \alpha_{H}(0)&=&1,\\ [Hp \cdot \alpha_{H}](0)&=&0,\\ [Hp \cdot \alpha_{H} \cdot \beta_{H}](0)&=&0. \end{eqnarray*} $$

To perform senstivity analysis that is described in the Blood section of the BioSpray models, MATLAB was used. Two files were written one to set the function, haptosen.m, and one to solve the function and plot the results in Figure 1, run_haptosen.m. Both files are shown below, where the green is comments to aid in understanding of the scripts.

  

MATLAB code from haptosen.m file

%Function to define the non-dimensionalised system of ODEs describing the binding between Haptoglobin and Haemoglobin.
% u is a 4 dimensional vector %where; % u(1)=Hp (Haptoglobin concentration) % u(2)=alphaHemo (Free Hemoglobin) % u(3)=alphaHemo/Hapto complex (Haptoglobin + alphaHemo complex) % u(4)=Hemo/Hapto complex (Full hemo/hapto complex). % t is the time that the simulation is run over. % lambda represents the parameter in the system determined by binding rates nd initial concentration of haemoglobin. % gamma represents the parameter in the system determined by binding rates. function f = haptosen(t,u,lambda,gamma); % define the system of ODEs by setting the vector f = left hand side of the system. f = [u(3)-lambda.*u(1)*u(2); u(3)-lambda.*u(1)*u(2); -u(3)+lambda.*u(1)*u(2)-gamma.*u(3); gamma.*u(3)]; % The function is then ended. end % This function can then be called in the run_haptosen.m file by using % @haptosen command. % END OF FILE

MATLAB code from run_haptosen.m file

File to perform sensitivity analysis for Haptoglobin and Haemoglobin binding model.
% a is the number of values chosen for each of the ranges of parameters. % Therefore 100 different values were chosen. a=100; %Lambda1 is the range of values for the parameter Lambda, chosen with the %expected value of (100/317)*0.3878494524 as the mean value. lambda1=linspace(0,((100/317)*0.3878494524)*2,a); %Gamma1 is the range of values for the parameter Gamma, chosen with the %expected value of (83/317) as the mean value. gamma1=linspace(0,(83/317)*2,a); %T is the final time of the simulation. T=30; % Store sets an empty matrix for the final concentrations of the complex % with the varied parameter values. Store = zeros(a,a); %figure(1) calls up a new figure. figure(1) % The for loop solves the ode system defined in haptosen function using ode23 for the range of values for both % parameters. for i=1:a for j=1:a [t,u]=ode23(@haptosen,[0 T],[4.17 1 0 0],[],lambda1(a+1-i),gamma1(j)); Store(i,j) = u(end,4); % Store(i,j) = (u(3,4)-u(2,4))/(t(3)-t(2)); end end %imagesc plots the surf plot of the parameters and the complex %concentration. imagesc(Store) % xlabel and ylabel add labels to the plot. xlabel('Increasing \lambda','FontSize',15,'FontWeight','bold'); ylabel('Increasing \gamma','FontSize',15,'FontWeight','bold'); %set removes the x and y axis set(gca,'YTick',[],'XTick',[]); % The following lines add a colour bar with defined labal and text. c=colorbar('Ticks',[0,0.99],'TickLabels',{'None','High'},'FontSize',15,'FontWeight','bold'); c.Label.String = 'Complex Concentration'; %the following lines add a text arrow to allow for annotation of the graph with defined colours positions and width. ta1 = annotation('textarrow', [0.13 0.79], [0.13 0.92]); h = text(0.5,0.5,'Complex Formation'); s = h.FontSize; h.FontSize = 12; j = h.Rotation; h.Rotation=45; k = h.Position; h.Position = [0.5 0.5 0]; b = ta1.Color; d=ta1.LineWidth; ta1.Color = 'red'; ta1.LineWidth= 4; % END OF FILE

Semen: PotD and Spermidine Binding MATLAB Code

Before using MATLAB the original system of equations was non-dimensionalised to the system:

$$ \begin{eqnarray*} \frac{dP}{d\tau}&=&C-\kappa P S,\\ \frac{dS}{d\tau}&=&C-\kappa P S,\\ \frac{dC}{d\tau}&=&\kappa P S -C. \end{eqnarray*} $$

The initial conditions were also non-dimensionalised to become:

$$ \begin{eqnarray*} P(0)&=&R_{0},\\ S(0)&=&1,\\ C(0)&=&0. \end{eqnarray*} $$

To perform senstivity analysis that is described in the Semen section of the BioSpray models, MATLAB was used. Two files were written one to set the function, spermsen.m, and one to solve the function and plot the results in Figure 2, Figure 3 and Figure 4, run_spermsen.m. Both files are shown below, where the green is comments to aid in understanding of the scripts.

MATLAB code from spermsen.m file.

%Function to define the non-dimensionalised system of ODEs describing the binding between Spermidine and PotD.
% u is a 3 dimensional vector %where; % u(1)= P (PotD Concentration), % u(2)= S (Spermidine Concentration) % u(3)= C (PotD and Spermidine Complex Concentration. ) % t is the time that the simulation is run over. % kappa is the binding parameter determoned by the binding rates and % initial concentration of Spermidine. function f = spermsen(t,u,kappa) % define the system of ODEs by setting the vector f = left hand side of the system. f = [u(3)-kappa.*u(1)*u(2); u(3)-kappa.*u(1)*u(2); kappa.*u(1)*u(2)-u(3)]; % The function is then ended. end % This function can then be called in the run_spermsen.m file by using % @spermsen command. % END OF FILE %

MATLAB code for run_spermsen.m file.

%%Section 1: File to perform sensitivity analysis for PotD and Spermidine binding model.
% This section runs the analysis on both the binding parameter kappa and the ratio between PotD and Spermidine, u0. % a is the number of datapoints in the range for both kappa and u0, chosen to be 50. a=50; % kappa1 is the range of values for kappa that the system will be solved over, % where the max is twice the expected value. kappa1=linspace(0,(129.0875)*2,a); % u0 is the range of values for u0 that the system will be solved over % where the max is four times the expected value. u0=linspace(0,2,a); % T is the final time of the simulation in seconds. T=0.10; % Store is set as an empty matrix that will be filled by the values for the % complex concentration for each of the values of kappa and u0. Store = zeros(a,a); % The for loop solves the function spermsen.m using ode23 for the range of values of % kappa and u0, and stores the complex concentration values in the Store matrix. for i=1:a for j=1:a [t,u]=ode23(@spermsen,[0 T],[u0(a-i+1) 1 0],[],kappa1(j)); Store(i,j) = u(end,3); end end %imagesc plots the complex concentration against u0 and kappa. imagesc(Store) % label function adds x labels to both the x and y axis. xlabel('Increasing R_{0}','FontSize',15,'FontWeight','bold'); ylabel('Increasing \kappa','FontSize',15,'FontWeight','bold'); % the set function removes the values from the x and y axis. set(gca,'YTick',[],'XTick',[]); % the color bar function adds a user defined colourbar with the label, % 'Complex Concentration'. c=colorbar('Ticks',[0,0.99],'TickLabels',{'None','High'},'FontSize',15,'FontWeight','bold'); c.Label.String = 'Complex Concentration'; % The resulting plot is Figure 2. % % %%Section 2: This section is used to plot only u0 against complex concentration over time. % a is the number of datapoints in the range for u0, chosen to be 50. a=50; % u0 is the range of values for u0 that the system will be solved over % where the max is four times the expected value. u0=linspace(0,2,a); % store is set as an empty matrix that will be filled by the values for the % time values, PotD concentration, Spermidine concentration and % complex concentration for each value of u0. store = zeros(a,4,a); %1st is time, 2:4 are u. % The for loop solves spermsen.m for the range of values of u0 and stores % tha values in the store matrix. for i=1:a [t,u]=ode23(@spermsen,[0 0.1],[u0(i) 1 0],[],129.0875); store(end-size(t,1)+1:end,1,i) = t; store(end-size(t,1)+1:end,2:4,i) = u; end % figure calls up an empty figure so that figure 2 is not overwritten. figure % u0 is then plotted against complex concentration, u(3). plot(u0,squeeze(store(end,4,:)),'LineWidth',2); % label function adds x labels to both the x and y axis. xlabel('Increasing R_{0}','FontSize',15,'FontWeight','bold'); ylabel('Concentration of Complex Formed','FontSize',15,'FontWeight','bold'); % This plot is Figure 3. % % %%Section 3: This section is used to plot only kappa against complex concentration over time. % a is the number of datapoints in the range for kappa, chosen to be 50. a=50; % kappa1 is the range of values for kappa that the system will be solved over, % where the max is twice the expected value. kappa1=linspace(0,(129.0875)*2,a); % store is set as an empty matrix that will be filled by the values for the % time values, PotD concentration, Spermidine concentration and % complex concentration for each value of kappa. store = zeros(a,4,a); %1st is time, 2:4 are u % The for loop solves spermsen.m for the range of values of kappa and stores % tha values in the store matrix. for i=1:a [t,u]=ode23(@spermsen,[0 0.1],[1.4 1 0],[],kappa1(i)); store(end-size(t,1)+1:end,1,i) = t; store(end-size(t,1)+1:end,2:4,i) = u; end % figure calls up an empty figure so that figure 3 is not overwritten. figure % kappa is then plotted against complex concentration, u(3). plot(kappa1,squeeze(store(end,4,:)),'LineWidth',2); % axis tight ensures the axis are not too large for the datapoints. axis tight % label function adds x labels to both the x and y axis. xlabel('Increasing \kappa','FontSize',15,'FontWeight','bold'); ylabel('Concentration of Complex Formed','FontSize',15,'FontWeight','bold'); % This plot is Figure 4. % END OF FILE

Saliva: Lactoferrin and Lactoferrin Binding Protein Binding MATLAB Code

Nasal Mucus: Oderant Binding Protein Folding MATLAB Code.

Before using MATLAB the original system of equations was non-dimensionalised to the system:

$$ \begin{eqnarray*} \frac{d\alpha}{d\tau}&=&OBP-\psi \alpha \beta,\\ \frac{d\beta}{d\tau}&=&OBP-\psi \alpha \beta,\\ \frac{dOBP}{d\tau}&=&\psi \alpha \beta -OBP. \end{eqnarray*} $$

The initial conditions were also non-dimensionalised to become:

$$ \begin{eqnarray*} \alpha(0)&=&1,\\ \beta(0)&=&D_{0},\\ OBP(0)&=&0. \end{eqnarray*} $$

To perform senstivity analysis that is described in the Nasal Mucus section of the BioSpray models, MATLAB was used. Two files were written one to set the function, obp.m, and one to solve the function and plot the results in Figure 5, Figure 6 and Figure 7, run_obp.m. Both files are shown below, where the green is comments to aid in understanding of the scripts.

MATLAB code from obp.m file

%Function to define the non-dimensionalised system of ODEs describing the folding of the Oderant Binding Protein (OBP).
% u is a 3 dimensional vector %where; % u(1)= alpha (Alpha Helix Concentration), % u(2)= beta (Beta Barrel Concentration) % u(3)= OBP (Folded OBP Concentration. ) % t is the time that the simulation is run over. % K represents psi, the binding parameter determined by the binding rates and % initial concentration of alpha helices. function f = obp(t,u,K) % define the system of ODEs by setting the vector f = left hand side of the system. f = [u(3)-K*u(1)*u(2); u(3)-K*u(1)*u(2); -u(3)+K*u(1)*u(2)]; % The function is then ended. end % This function can then be called in the run_obp.m file by using % @obp command. % END OF FILE

MATLAB code for run_obp.m file.

%%File to perform sensitivity analysis for OBP folding model. Section 1: This section runs sensitivity analysis for both the parameter psi (K) and the ratio between beta barrels and alpha helices, D_{0} (v0).
a is the number of datapoints in the range for both K and v0, chosen to be 50. a=50; % K is the range of values for K that the system will be solved over, where % the max is twice the expected value. K=linspace(0,(5291.005292)*2,a); % u0 is the range of values for v0 that the system will be solved over, % where the max is twice the expected value. v0=linspace(0,4,a); % T is the final time of the simulation in seconds. T=0.001; % Store is set as an empty matrix that will be filled by the values for the % folded OBP concentration for each of the values of K and v0. Store = zeros(a,a); % Call up first empty figure to plot in. figure(1) % The for loop solves the function obp.m using ode23 for the range of values of % K and v0, and stores the complex concentration values in the Store matrix. for i=1:a for j=1:a [t,u]=ode23(@obp,[0 T],[1 v0(a-i+1) 0],[],K(j)); Store(i,j) = u(end,3); end end %imagesc plots the complex concentration against v0 and K. imagesc(Store) % label function adds x labels to both the x and y axis. xlabel('Increasing D_{0}','FontSize',15,'FontWeight','bold'); ylabel('Increasing \psi','FontSize',15,'FontWeight','bold'); % the set function removes the values from the x and y axis.. set(gca,'YTick',[],'XTick',[]); % the color bar function adds a user defined colourbar with the label, % 'Complex Concentration'. c=colorbar('Ticks',[0,0.99],'TickLabels',{'None','High'},'FontSize',15,'FontWeight','bold'); c.Label.String = 'Complex Concentration'; % The resulting plot is Figure 5. % % %%Section 2: This section is used to plot only v0 against complex concentration over time. a is the number of datapoints in the range for v0, chosen to be 50. a=50; % v0 is the range of values for v0 that the system will be solved over % where the max is four times the expected value. v0=linspace(0,4,a); % store is set as an empty matrix that will be filled by the values for the % time values, alpha helix concentration, beta-barrel concentration and % folded OBP concentration for each value of v0. store = zeros(a,4,a); %1st is time, 2:4 are u. % The for loop solves obp.m for the range of values of v0 and stores % the values in the store matrix. for i=1:a [t,u]=ode23(@spermsen,[0 0.001],[1 v0(i) 0],[],5291.005292); store(end-size(t,1)+1:end,1,i) = t; store(end-size(t,1)+1:end,2:4,i) = u; end % figure calls up an empty figure so that Figure 5 is not overwritten. figure(2) % v0 is then plotted against complex concentration, u(3). plot(v0,squeeze(store(end,4,:)),'LineWidth',2); % label function adds x labels to both the x and y axis. xlabel('Ratio of \beta to \alpha, D_{0}','FontSize',15,'FontWeight','bold'); ylabel('Concentration of Complex Formed','FontSize',15,'FontWeight','bold'); % annotation command allows us to add lines with specified style, width and colour % for annotation of the graph, % these can then be manually manipulated by using the edit plot tool. t2 = annotation('line', [0.42 0.42], [0.15 0.91]); b = t2.Color; d=t2.LineWidth; g=t2.LineStyle; t2.Color = 'red'; t2.LineWidth= 2; t2.LineStyle= ':'; % This plot is Figure 3. % % %%Section 3: This section is used to plot only K against folded OBP over time. % a is the number of datapoints in the range for K, chosen to be 50. a=50; % K is the range of values for K that the system will be solved over, % where the max is twice the expected value. K=linspace(0,(5291.005292)*2,a); % store is set as an empty matrix that will be filled by the values for the % time values, alpha helix concentration, beta-barrel concentration and % folded OBP concentration for each value of K. store = zeros(a,4,a); %1st is time, 2:4 are u for i=1:a [t,u]=ode23(@spermsen,[0 0.001],[1.5 1 0],[],K(i)); store(end-size(t,1)+1:end,1,i) = t; store(end-size(t,1)+1:end,2:4,i) = u; end % The for loop solves obp.m for the range of values of K and stores % the values in the store matrix. % figure calls up an empty figure so that Figure 6 is not overwritten. figure(3) % K is then plotted against complex concentration, u(3). plot(K,squeeze(store(end,4,:)),'LineWidth',2); % axis tight ensures the axis are not too large for the datapoints. axis tight % label function adds x labels to both the x and y axis. xlabel('Increasing K','FontSize',15,'FontWeight','bold'); ylabel('Concentration of Complex Formed','FontSize',15,'FontWeight','bold'); % This plot is Figure 7. % END OF FILE
-->