} \right) - \frac{\partial T}{\partial q_k} = Q_k \qquad \qquad k = 1, 2, 3
    \end{equation}
</p>
<p>where</p>
<p>
    \begin{eqnarray}
    \frac{\partial T}{\partial q_1} &=& \frac{\partial T}{\partial x} = 0 \\
    \frac{\partial T}{\partial q_2} &=& \frac{\partial T}{\partial y} = 0 \\
    \frac{\partial T}{\partial q_3} &=& \frac{\partial T}{\partial \psi} = 0
    \end{eqnarray}
</p>
</p><pre class="codeinput">dTdq1 = diff(T,x);
dTdq2 = diff(T,y);
dTdq3 = diff(T,PSI);
dTdq = [ dTdq1 ; dTdq2 ; dTdq3 ];