Derivative of a Function
19 views (last 30 days)
Show older comments
Is there a way to input a function as "g=@(x) exp(x^2-2);" and take the derivative?
0 Comments
Accepted Answer
James Tursa
on 17 Apr 2015
Edited: James Tursa
on 17 Apr 2015
If you have the Symbolic Toolbox:
>> g = @(x) exp(x^2-2)
g =
@(x)exp(x^2-2)
>> syms x
>> diff(g(x))
ans =
2*x*exp(x^2 - 2)
0 Comments
More Answers (0)
See Also
Categories
Find more on Calculus 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!