%Script for numerical integration of an unregulated promoter
%Clear all variables. You shouldn't worry too much about this.
clear all
%Parameters of the model
r=10; %Production in 1/min
gamma=1/30; %Degradation rate in 1/min
dt=0.1; %Time step for our calculation
TotalTime=100; %Total time of integration
%How many steps of integration do we need to take?
NumberTimeSteps=TotalTime/dt;
m(1)=0; %Initial conditions
%We also need ot keep track of time
Time(1)=0;
for i=2:NumberTimeSteps
%At each time point account for production and degradation of mRNA
%molecules
m(i)=m(i-1)+r*dt-gamma*dt*m(i-1);
Time(i)=Time(i-1)+dt;
end
%Now plot the results
plot(Time,m)
xlabel('Time (min)')
ylabel('Number of mRNA molecules')