Differentiating a symbolic function

2 views (last 30 days)
Md Monirul Islam
Md Monirul Islam on 24 Mar 2017
Answered: Roger Stafford on 24 Mar 2017
i want to differentiate f=@(x)x^3-4*x^2+x+6; how can i do this? how i can find f'(x)?

Answers (2)

KSSV
KSSV on 24 Mar 2017
syms x
f=x^3-4*x^2+x+6;
df = diff(f)

Roger Stafford
Roger Stafford on 24 Mar 2017
Express your function in symbolic form and use ‘diff’.

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!