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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by