This is one of the application problems in Springer's book "Virtual Reality and Animation for Matlab and Simulink Users".
The problem is a collision of two boxes. In one case, the collision is perfect, in the othere, some of the energy is lost(transformed into fricitonal heat).
You need the Virtual Reality Toolbox to be installed.
Download and run the following scripts:
Nassim Khaled (2021). Collision of Two Boxes (https://www.mathworks.com/matlabcentral/fileexchange/44267-collision-of-two-boxes), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!