MATHEMATICA FEATURED EXAMPLE

A Mechanical System with Algebraic Constraints

This mass-spring-damper system includes a rigid bar that can prevent the motion of the second mass.

    
In[96]:=
Click for copyable input
Obtain a StateSpaceModel representation:
In[98]:=
Click for copyable input
Use OutputResponse to simulate the system both when the bar is locked and unlocked:
New to Mathematica? Find your learning path »
Have a question? Ask support »