First- and second-order complex step derivative approximation.
cdiff(F,X) returns the first order derivative approximation of the function F evaluated at X. F is a function handle with a single input argument that returns an output of the same dimensions as the floating-point array X.
Inspired by: http://blogs.mathworks.com/cleve/2013/10/14/complex-step-differentiation/
Andrew Horchler (2022). cdiff (https://github.com/horchler/cdiff), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!