View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Automatic Differentiation for Matlab

3.9 | 9 ratings Rate this file 83 Downloads (last 30 days) File Size: 116 KB File ID: #15235 Version: 1.0

Automatic Differentiation for Matlab


Martin Fink (view profile)


08 Jun 2007 (Updated )

This package provides automatic first and second derivatives for vector-functions and matrices.

| Watch this File

File Information

This package uses forward automatic differentiation to calculate the first and second derivatives of provided user functions. It is 25-30 times faster than
commercially available packages (June 2006).

To calculate the derivatives of function myFunc with respect to x at x=x0 you call

x = myAD(x0);
result = myFunc(x);
functionValue = getvalues(result);
derivatives = getderivs(result);

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
01 Dec 2016 Jorge Sabat

I am getting this error, do you have any idea of what can be happening?

The following error occurred converting from myAD to double:
Error using double
Conversion to double from myAD is not possible.

Comment only
02 Sep 2016 Changjie Guan

31 May 2016 Pengfei

I run into the same problem as described by David, input_variable(1)*internal_function_vector(1:N) couldn't go through, the operation is not covered. Otherwise it'll be a terrific package.

08 Aug 2013 Juan

Juan (view profile)

31 Dec 2010 Gabriel Peyre

Gabriel Peyre (view profile)

25 May 2009 Achim Schaedle

nice and usefull

06 May 2009 David

David (view profile)

This package is only useful if there are no matrix operations in your function, and this includes repmat on vectors. An operation as simple as

est = input_variable(1) * internal_function_vector(1:N)

falls outside the bounds of this routine, so be warned!

08 Apr 2009 Adam Attarian

17 Sep 2008 masharvi shams

how to use this?plz, help me

Comment only
24 Sep 2007 Cristian Montes

This is great! Thanks so much. Would you like to port it to R?

Comment only
17 Jul 2007 Julian Montanez Vega

is very insteresting
excellent work

22 Jun 2007 carlos david vinante bewaller

Contact us