Differentiating a symbolic function

2 次查看(过去 30 天)
i want to differentiate f=@(x)x^3-4*x^2+x+6; how can i do this? how i can find f'(x)?

回答(2 个)

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

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

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by