Numerical derivative of analytic function

バージョン 1.0.0.0 (2.82 KB) 作成者: Daniel Ennis
Calculate the numerical derivative of an analytic function with different methods.
ダウンロード: 6K
更新 2016/3/31

ライセンスの表示

% This function returns the numerical derivative of an analytic function.
% Of special note, is the incorporation of the "complex step-derivative"
% approach which offers greatly improved derivative accuracy compared to
% forward and central difference approximations. This is especially germain
% when accuracy at the level of machine precision is a concern.
%
% This function was motivated by: http://www.biomedicalcomputationreview.org authored by Michael Sherman
% -The function with no inputs generates the example used in the above link.
% -For more information see the following citation which is also found in the above link:
% --Martins JR, Sturdza P, and Alonso JJ
% http://portal.acm.org/citation.cfm?id=838250.838251
% The complex-step derivative approximation
% ACM Trans. Math. Softw. 29(3) (2003)
%
% SYNTAX: dfdx=deriv(f,x,h,method)
%
% INPUTS: f - A function a handle (eg f=@(x) sin(x))
% x - Interval over which f(x) is defined
% h - Derivative step-size
% method - Numerical methods used to compute derivative
% 'forward2' - Two point forward difference
% 'forward3' - Three point forward difference
% 'central2' - Two point central difference
% 'central4' - Four point central difference
% 'complex' - Complex step-derivative approximation
%
% OUTPUTS: dfdx - Numerical estimate of the derivative of f(x)
%
% DBE 2006.07.31

引用

Daniel Ennis (2024). Numerical derivative of analytic function (https://www.mathworks.com/matlabcentral/fileexchange/11870-numerical-derivative-of-analytic-function), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R14SP3
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCalculus についてさらに検索
謝辞

ヒントを与えたファイル: Adaptive Robust Numerical Differentiation

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0

Update BSD License.
Minor fix of the "description."