Differentiating a symbolic function
显示 更早的评论
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
2017-3-24
syms x
f=x^3-4*x^2+x+6;
df = diff(f)
Roger Stafford
2017-3-24
0 个投票
Express your function in symbolic form and use ‘diff’.
类别
在 帮助中心 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!