Evaluating derivative using symbolic toolbox
Afficher commentaires plus anciens
Hello all, I am trying to evaluate a derivative using the symbolic tool box.
I chose a simpler exquation to show, but if I can get this to work my code will work.
Here's the issue:
syms x
f_of_x = x^2 * sin(x)
der = diff(f_of_x)
der_2 = der(2)
As you can see I'm trying to evaluate the function @x = 2; but I'm getting the error "index exceeds number of array elements"
I checked the documentation and I literally abandoned my code, and wrote the example code direct from the documentation, still doesn't work.
Réponse acceptée
Plus de réponses (1)
WILLIAM WENGER
le 10 Fév 2022
0 votes
Catégories
En savoir plus sur Symbolic Variables, Expressions, Functions, and Settings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!