This is new version of newton craddle, the parameters have been changed as suggestion from Steve.
HT Dai (2019). Newton craddle simulation with Contact forces library (https://www.mathworks.com/matlabcentral/fileexchange/71184-newton-craddle-simulation-with-contact-forces-library), MATLAB Central File Exchange. Retrieved .
Thanks very much!
This is great - a classic contact forces problem. I find your model shows more realistic-looking behavior if you set the "disp=0.2-5e-5;" in your model workspace (the balls need to be touching each other more at the start), set the solver to ode23t, Relative Tolerance to 1e-4, and Absolute Tolerance to 1e-5. Great work! --Steve
I have changed the parameters as comment from Steve. It's great! Now it works well!