Construct simulation in MATLAB to portray a macrophage chasing a bacteria as it diffuses away and ultimately catching it if:
-in the presence of a bacteria, it is clear that the macrophage tends to be attracted by it.
-bacteria should is taking a purely random walk on a square grid, moving one step in one of the four cardinal directions in each time step.
-the simulated macrophage also moves on the same grid, one step per time step, but the probability that the macrophage moves towards the bacteria should be higher than for other directions.
-to answer the question about how much sensitivity is required to catch the bacteria, the amount of the tendency needs to be adjustable.
Allow the bias to be between 0 and 1, with zero meaning that the macrophage performs an unbiased random walk just like the bacteria, and one meaning that the macrophage always moves closer to the bacteria.
-when the macrophage gets within a certain distance from the bacterium (let's say two units), the simulation should stop, since the macrophage has caught the bacterium.
-the simulation should also stop after some predetermined amount of time, let's say 1,000 steps, if the macrophage hasn't caught the bacteria.
-start the macrophage and bacterium on the x-axis, the macrophage at (0,0) and the bacterium at (20,0).