Question

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!

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top