Derivative of a Function

20 ビュー (過去 30 日間)
Cameron
Cameron 2015 年 4 月 17 日
編集済み: James Tursa 2015 年 4 月 17 日
Is there a way to input a function as "g=@(x) exp(x^2-2);" and take the derivative?

採用された回答

James Tursa
James Tursa 2015 年 4 月 17 日
編集済み: James Tursa 2015 年 4 月 17 日
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 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by