Want Function: Derivation of (x) returns a function of dx (euler-lagrange equation problem)

Hello, I am trying to derive equations, in such a way that the returned function is a function of the derivative of the variable I derive for. i.e. diff(f(x))= f(dx).
Example:
f(x) = 2x
deriveVariable = x
I want:
someFunction(f(x),deriveVariablle) = 2*dx.
I need this because I am deriving positions and velocities, and therefore need the returned equation to be a function of the derivative of the variable I derive for, instead of it being truncated as the function diff() does.
Is there any way to do this? I am using MatLab R2013a.
My goal is to use matlab to solve euler-lagrange equation(below) for the dynamics of a robotic arm system. If there is another simpler way to directly do that, that would solve my problem as well.
euler-lagrange equation =
(d/dt)*((partialDerivative*f(x))/ (partialDerivative ((d/dt)*x))) -
((partialDerivative*f(x))/ (partialDerivative x))
Thanks a bundle

답변 (1개)

Mischa Kim
Mischa Kim 2014년 2월 28일
Matt, there are a couple of tools for deriving Lagrange's equations on File Exchange.

카테고리

도움말 센터File Exchange에서 Marine and Underwater Vehicles에 대해 자세히 알아보기

제품

질문:

2014년 2월 28일

답변:

2014년 2월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by