%ORIGINAL GROWTH MODEL %define the function file function [vdot] = growth(t,v) % a general growth model where the cocentration of nutrient does not have any influence on the bacterial growth %Declare parameters k=2.03; % Rate constant cmax = 5; % Maximum nutrient concentration n =3.05; % the Hill coefficient, describes how cooperative the two variable are Ka =5; % the nutrient concentration occupying half of the cell %Declare time points t0=0.5; t1=2; t2=2.03; t3=7; ft=zeros(size(t)); %Nutrient concentration %Generate nutrient conc against time for i=1:length(ft) if t(i) < t0 ft(i) = 0; % where ft stands for f(t) else if t(i)>= t0 && t(i)=t1 && t(i) <= t2 ft(i) = cmax; else if t(i)> t2 && t(i) <= t3 ft(i) = cmax+(cmax / (t2-t3))*(t(i)-t2); else if t(i)> t3 ft(i) = 0; end; end; end; end; end; end; vdot = (k*((ft).^n) ./ ( ((Ka)^n) + (ft).^n))*v;