Other alternative than syms for differentiation and integration?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Muhammad Fakhruddin Abd Rahim
el 15 de Nov. de 2019
Comentada: Star Strider
el 18 de Nov. de 2019
Hello Everyone,
I'm trying to use differentiation in Matlab using this code
syms X;
fun = x^3+2*x+10;
diff (fun,x);
But I got this error
"Undefined function 'syms' for input arguments of type 'char'.
Error in Diff_Integ (line 1)
syms X;"
Is there any alternative ways to use differentiation without using syms?
0 comentarios
Respuestas (2)
Star Strider
el 15 de Nov. de 2019
MATLAB is case-sensitive, so X ~= x.
Try this:
syms x;
fun = x^3+2*x+10;
dfundx = diff (fun,x);
producing:
dfundx =
3*x^2 + 2
12 comentarios
Walter Roberson
el 15 de Nov. de 2019
https://www.mathworks.com/help/matlab/ref/polyder.html for the special case of polynomials.
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!