functionalDerivative, deriving as function of derivative?

조회 수: 1 (최근 30일)
Dan D
Dan D 2016년 2월 8일
댓글: Dan D 2016년 2월 8일
Hello all,
I'm attempting to compute a Lagrangian EQs of motion.
Part of this requires computing the partial derivative of L with respect to variable_dot, the derivative of the variable.
syms t m1 m2 x1(t) x2(t) k
K = (1/2)*m1*diff(x1,t)^2;
P = (sym(1)/2)*k*(x1-x2)^2;
L = K - P
diff( functionalDerivative( L, diff(x1)) ,t) - functionalDerivative(L,x1)
functionalDerivative() does not like the form of the "diff(x1)". Is there a way to do this?
Thanks a lot, Dan

답변 (1개)

John BG
John BG 2016년 2월 8일
Takeshita san has a detailed explanation how to solve the Euler-Lagrange equation with MuPAD:
If you find this link useful, please click on the thumbs-up vote link above,
thanks in advance
John
  댓글 수: 1
Dan D
Dan D 2016년 2월 8일
I was hoping that the new functionalDerivative() function would make this a little cleaner. it works great for the partial derivative in respect to x(t), it just doesn't seem to be able to handle diff(x(t)) as a parameter.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by