Edinburgh/SBCode

From 2007.igem.org

This is the SBToolBox code we developed for simulation of the ODEs model.

The SBToolBox Code

********** MODEL NAME
Model of the Division PoPer Construct of Edinburgh iGEM 2007 Team
********** MODEL NOTES
The model represents the Division PoPper construct with the addition of a reporter protein placed downstream
********** MODEL STATES
d/dt(YFP) = YFPexp*ForwardPhase(time)-YFPdeg*YFP 
d/dt(GFP) = GFPexp*BackwardPhase(time)-GFPdeg*GFP 
YFP(0) = 0
GFP(0) = 0
********** MODEL PARAMETERS
YFPexp = 0.0001 
GFPexp = 0.0001 
GFPdeg = 0.05 
YFPdeg = 0.05                                                                                                                     
********** MODEL VARIABLES
********** MODEL REACTIONS
********** MODEL FUNCTIONS
********** MODEL EVENTS
********** MODEL MATLAB FUNCTIONS
function [result] = ForwardPhase(t)                                                                                                          
FlippingTime=15;                                                                                                                             
DivisionTime=80;                                                                                                                             
temp=0;                                                                                                                                      
temp = mod(t,2*DivisionTime+2*FlippingTime);                                                                                                 
if temp < (DivisionTime)                                                                                                                     
 result=1;                                                                                                                                  
else result=0;                                                                                                                               
end                                                                                                                                          
return                                                                                                                                       
                                                                                                                                            
function [result] = BackwardPhase(t)                                                                                                         
FlippingTime=15;                                                                                                                             
DivisionTime=80;                                                                                                                             
temp=0;                                                                                                                                      
temp = mod(t,2*DivisionTime+2*FlippingTime);                                                                                                 
if temp > (DivisionTime+FlippingTime)                                                                                                        
  if temp < (2*DivisionTime+FlippingTime)                                                                                                   
     result=1;                                                                                                                              
   else result=0;                                                                                                                           
  end                                                                                                                                       
else result=0;                                                                                                                              
end                                                                                                                                          
return