%Model Construction of Bacteria Motility %Gaussian distribution of velocity v=[1:0.01:20]; %Range of velocities v_avg=10; %Average velocity v0 v_dev=v_avg/10; %Standard Deviation sigma-1 y1=normpdf(v,v_avg,v_dev); %Generation of PDF of velocities subplot(2,2,1); plot(v,y1); title('PDF of Bacteria "Run" Velocity') xlabel('Velocity'); ylabel('Probability Density'); %Gaussian distribution of run-time t=[0:0.001:2]; %Range of run duration t_avg=1; %Average run duration t_dev=t_avg/10; %Standard Deviation sigma-2 y2=normpdf(t,t_avg,t_dev); %Generation of PDF of run duration subplot(2,2,2); plot(t,y2); title('PDF of Bacteria "Run" Duration') xlabel('Time'); ylabel('Probability Density'); % Distribution of angles x=[-pi:0.01:pi]; %Range of angle theta x_avg=0; %Average turn angle k=1; %Beta factor b=besselj(0,k); %Generates a Bessel function of first kind and order 0 y3=(1/(2*pi*b))*exp(k*cos(x-x_avg)); %Generates the Von Mises distribution subplot(2,2,3); plot(x,y3); Title('PDF of Tumbling Angle'); xlabel('Tumbling Angle'); ylabel('Probability Density'); % Distribution of tumbling-time ts=[0:0.001:0.2]; %Range of tumbling duration ts_avg=0.1; %Average tumbling duration ts_dev=ts_avg/10; %Standard Deviation sigma-s y4=normpdf(ts,ts_avg,ts_dev); %Gernation of PDF of tumbling duration subplot(2,2,4); plot(ts,y4); title('PDF of Bacteria "Tumbling" Duration') xlabel('Time'); ylabel('Probability Density');