Derivative is calculated 2 different ways.
Mostrar comentarios más antiguos
I used the code syms x ((x^2)+4)^2*(2*x^3-1)^3 diff(ans)
This is an improper result-- but if I use syms x ((x^2)+4)^2*(2*x^3-1)^3 expand(ans) diff(ans)
It works fine.
Even more frustratingly, when I name the function anything, my workaround with "expand" no longer works. I can only do it as expand(ans). Any explanation of why? My whole class is having an issue with this problem and I am the only one who has been able to get MATLAB to get the correct answer-- but I don't know why.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Code Performance 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!