Differentiate a function by a function
-
02-06-2021 - |
문제
I'm just a little bit lost here. I'm using the latest MATLAB release with the symbolic maths toolbox. At the moment I'm working on a system, which has equations like x=theta(t)+2 (of course a lot more complicated and longer). Now I would like to differentiate this equation by theta(t). Hence, I should get x=1. However, if I use the diff(x,theta) command I only get the message Invalid variable.
How do I do it? What am I doing wrong?
Thanks!
해결책
I used to have the same problem, but using Maple or sympy. Try substituting theta(t) by theta in the right hand side of the equation and then differentiate wrt. theta.
제휴하지 않습니다 StackOverflow