This MATLAB scrupts generate trajectory from one point to another point with minimal jerk.
Overview on minimum jerk trajectory can be found at http://shadmehrlab.org/book/minimum_jerk/minimumjerk.htm
Some papers on this topic:
Amirabdollahian, F., Loureiro, R., & Harwin, W. S. (2002). Minimum jerk trajectory control for rehabilitation and haptic applications. In Proceedings of IEEE International Conference on Robotics and Automation (Vol. 4, pp. 3380–3385). http://doi.org/10.1109/ROBOT.2002.1014233
Kyriakopoulos, K. J. (1994). Minimum jerk for trajectory planning and control. Robotica, 12(02), 109. http://doi.org/10.1017/S0263574700016696