ass="codeinput">clear ; close <span class="string">all</span> ; clc

<span class="comment">% Generalized coordinates (symfun)</span>
syms <span class="string">x_t(t)</span> <span class="string">y_t(t)</span> <span class="string">PSI_t(t)</span>
<span class="comment">% Generalized coordinates and time derivatives (sym)</span>
syms <span class="string">x</span> <span class="string">dx</span> <span class="string">ddx</span> <span class="string">y</span> <span class="string">dy</span> <span class="string">ddy</