codeinput">dTddq1 = diff(T,dx);
dTddq2 = diff(T,dy);
dTddq3 = diff(T,dPSI);
dTddq  = [ dTddq1 ; dTddq2 ; dTddq3 ];
dTddq  = subs(dTddq,symVariables,symfunVariables);
ddTddq = diff(dTddq,t);
</pre><h2 id="17">State equations</h2><p>
<p>The equations of motion are</p>
<p>
    \begin{eqnarray}
    \nonumber m_{\rm T} \ddot{x} &=& F_{x,{\rm F}} \cos \left( \psi + \delta_{\rm F} \right) - F_{y,{\rm F}} \sin \left( \psi + \delta_{\rm F} \right) + F_{x,{\rm R}} \cos \left( \psi + \delta_{\rm R} \right) - F_{y,{\rm