Team:Paris/Modeling/BOB/Simulations/Codes

From 2008.igem.org

Revision as of 12:34, 2 September 2008 by Louis (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

  • Here are the different MatLab codes used for our simulations

FIFO

  • Code to Test the FIFO without FliA

beta=[1200/1450 150/450 100/450 50/350]; %% parameters value

Tspan=[0:0.1:40]


%% function to generate FlhDC evolution

   function Y = step(T)
       for i = 1:length(T)
           if (T(i) < 20)
               Y(i) = 1;
           else
               Y(i) = 0;
           end
       end
   end

%% function to set the equations

   function Y = Vp(t,V)
       Y(4,1)=0;
       for i = 1:3
           Y(i,1) = beta(i) * V(5) + ((1-beta(i)) * V(4)) - V(i);
       end
       Y(5,1) = step(t) - V(5);
   end

C0=zeros(5,1); %% initial conditions

%% ODE solver [bar C]=ode23(@Vp,Tspan,C0);

plot(Tspan,C) legend('CFP','YFP','RFP','FliA','FlhDC') end

  • Code to Test the FIFO without FliA

beta=[1200/1450 150/450 100/450 50/350]; %% parameters value

Tspan=[0:0.1:40]


%% function to generate FlhDC evolution

   function Y = step(T)
       for i = 1:length(T)
           if (T(i) < 20)
               Y(i) = 1;
           else
               Y(i) = 0;
           end
       end
   end

%% function to set the equations

   function Y = Vp(t,V)
       for i = 1:4
           Y(i,1) = beta(i) * V(5) + ((1-beta(i)) * V(4)) - V(i);
       end
       Y(5,1) = step(t) - V(5);
   end

C0=zeros(5,1); %% initial conditions

%% ODE solver [bar C]=ode23(@Vp,Tspan,C0);

plot(Tspan,C) legend('CFP','YFP','RFP','FliA','FlhDC') end