WOLFRAM LANGUAGE 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[1]:=
Click for copyable input
Obtain a StateSpaceModel representation:
In[2]:=
Click for copyable input
Out[2]=
Use OutputResponse to simulate the system both when the bar is locked and unlocked:
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=