Evaluating derivative using symbolic toolbox
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
WILLIAM WENGER
il 10 Feb 2022
0 voti
Categorie
Scopri di più su Symbolic Variables, Expressions, Functions, and Settings in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!