How to find a symbolic derivative?

조회 수: 2 (최근 30일)
Mike Meyers
Mike Meyers 2017년 11월 19일
편집: Mike Meyers 2017년 11월 19일
Assume you are writing a complex function - in my case, to find the equations of motion of a coupled drives system (CE108).
Is there a way to differentiate a symbolic variable (say, x) so that you get its symbolic derivative (in our case, dx)?
Example:
syms x, m
T = 0.5*m*x^2
y = SymbolicDerivative(T,x); %is there something like this
y = m*dx % that gives this?
Any custom made functions or any prebuilt ones you know?
Edit:
The function diff doesn't help, since it differentiates x to 1, while I am looking for something that instead derivates to dx

답변 (1개)

Star Strider
Star Strider 2017년 11월 19일
See if the functionalDerivative (link) function does what you want. (It was introduced in R2015a.)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by