Azzera filtri
Azzera filtri

Differentiate function by a function

2 visualizzazioni (ultimi 30 giorni)
Moritz
Moritz il 19 Apr 2012
Modificato: Manali Gupta il 21 Giu 2019
Hi
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!

Risposte (1)

Manali Gupta
Manali Gupta il 21 Giu 2019
Modificato: Manali Gupta il 21 Giu 2019
Hi Moritz,
Here theta(t) is not a symbolic variable but a symbolic function. You can differentiate a symbolic expression only w.r.t to a symbolic variable and not a symbolic function. Please refer to the documentation for more details.

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by