Matlab source code used for calculation of Time to Collision (TTC)