The process is repeated in each generation, and thereby great speed becomes an adaptation common to cheetahs.
This same process of natural selection, in which the organisms best adapted to their environment tend to survive and transmit their genetic characteristics in increasing numbers to succeeding generations while those less adapted tend to be eliminated, also favors the fastest gazelles.
Random variation results from slight genetic differences.
For example, one cheetah in a group may be slightly faster than the others and thus have a better chance of catching a gazelle.
If you replace the line dates = today - linspace(1169,0,15000)'; with dates = floor(now) - linspace(1169,0,15000)'; it will work without the 'today' function.