
% Load All parameters

reactiondata;

% Set Critical parameters 

n01 = [10 20 40 80];
n0 = [10 10 0 0]; % initial population
S0 = 1e9*n0/NAV;       % initial concentration (nM)  
k = [0.6 0.1];    % rate constants
pars = {NAV,k,c,M,p,l,n0,S0,nu,tf,runs}; % parameters cell array

for i=1:4
    n0(1)=n01(i);
    cells = stoch_gma(pars);
	std_n{i} = cells{6}/n0(1);
  	t_gilsp{i} = cells{7};
end
t1 = t_gilsp{1};
t2 = t_gilsp{2};
t3 = t_gilsp{3};
t4 = t_gilsp{4};
std1 = std_n{1}(:,1);
std2 = std_n{2}(:,1);
std3 = std_n{3}(:,1);
std4 = std_n{4}(:,1);

%time evolution of std_ns relative to mean_ns for #S1
figure
h = plot(t1,std1,'r',t2,std2,'b',t3,std3,'m',t4,std4,'k');
xlabel('time  (sec)','FontSize',8)
ylabel('norm. std.','FontSize',8)
text(100,0.04,'#{\it\fontname{Times} S_1}(0)=80');
text(100,0.08,'#{\it\fontname{Times} S_1}(0)=40');
text(100,0.12,'#{\it\fontname{Times} S_1}(0)=20');
text(100,0.16,'#{\it\fontname{Times} S_1}(0)=10');

% Shifting the axis within the figure

posi = get(gca,'Position');
set(gca,'Position',posi.*[1.15 1.15 1 1],'FontSize',8);

% printing adjustments

set(gcf, 'PaperType', 'A4', 'PaperOrientation', 'portrait', 'PaperPositionMode', 'manual', 'PaperUnits', 'centimeters', 'PaperPosition', [2 2 8 6.3]);

textobj = findobj('type', 'text');
set(textobj, 'fontunits', 'points', 'fontsize', 8);

% Printing the figure into an .eps file:

print -depsc 'illu_std.eps'