how to obtain anonymous function after derivative ?

6 visualizaciones (últimos 30 días)
Masoud Nateghi
Masoud Nateghi el 28 de Mzo. de 2020
Respondida: Walter Roberson el 28 de Mzo. de 2020
Hi,
can we have an anonymous function after we differntiate an anonymous function? for example see blow
f = @(x) x^4+3*x^2;
now I want to have another anonymous function which is derivative of f(x) .

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Mzo. de 2020
syms x
df = matlabFunction(diff(f(x), x), 'vars', {x})

Más respuestas (0)

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!

Translated by