Derivative a function according to another function
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello
This is my code :
t= sym('t');
y(t)=sym('y(t)');
%Then i do some calculation but let's say that
T= 1/2*y(t)^2 %this is not my function but an exemple.
I try to differentiate T according to y. I try diff(T,y) and diff(T,y(t)), both don't work.
Do you have any clue how to do that ?
Thanks
댓글 수: 0
답변 (1개)
Mischa Kim
2015년 5월 28일
Alexis, I believe functionalDerivative is what you are looking for:
t = sym('t');
y(t) = sym('y(t)');
T = 1/2*y(t)^2;
functionalDerivative(T,y)
ans(t) =
y(t)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!