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
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Common Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!