how to obtain anonymous function after derivative ?

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) .

 채택된 답변

Walter Roberson
Walter Roberson 2020년 3월 28일
syms x
df = matlabFunction(diff(f(x), x), 'vars', {x})

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by