how can I do a partial derivative to a time dependend variable?

Hi, at the moment I am computing equations of motion with Lagrange. As everyone knows, they can get pretty long and complicated :D therefore I am trying the symbolic toolbox. It is very important, that the variables are time dependend.
just an example of a code:
clear all
syms m g t l
alpha=sym('alpha(t)');
F=l*cos(alpha)*sin(alpha)*m*g;
dFdt=diff(F,t);
dFdalpha=diff(F,alpha);
ddFdt_dalpha_dot=diff(dFdt,alphadot);
the time derivative for F works fine but how can I do a partial derivative with respect to alpha and even further a partial derivative with respect to diff(alpha(t), t) (which is alphadot)?
I tried serval ways but I could not figure out how this works.
thank you very much for your help!
Manu

Answers (0)

Asked:

on 22 Feb 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!