Evaluating derivative using symbolic toolbox
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
WILLIAM WENGER
el 10 de Feb. de 2022
0 votos
Categorías
Más información sobre Symbolic Variables, Expressions, Functions, and Settings 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!