Problem with diff(f, diff())
Mostrar comentarios más antiguos
Hi there,
I want to differentiate a long equasion L with respect to thetaAdot and ran into a problem. I managed to break it down to the following:
Example 1:
syms x a
f(x, a)=3*x+2*a^2;
df=diff(f, a)
ans=4a -> perfectly fine
Example 2:
syms x a adot
adot=diff(a);
f(x, adot)=3*x+2*adot^2;
df=diff(f, adot)
-> Error
It seems MATLAB has a problem with the derivative but I cannot figure out why? Can you help me with this?
Thank you in advance!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Common Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
