From: Umberto Picchini on
"ben harper" <controlusc(a)gmail.com> wrote in message <h98n9d$pn9$1(a)fred.mathworks.com>...
> in file exchange i have found numerical differentiation codes like:
> http://www.mathworks.com/matlabcentral/fileexchange/22807
> http://www.mathworks.com/matlabcentral/fileexchange/13490
> http://www.mathworks.com/matlabcentral/fileexchange/11870
>
> but my model is not consisted of analytical equations.
> i have some linear functions, some rule based equations (if / then / else) and some numerical equations. so i can't calculate the derivative.
> is there a program/code etc. for this.
>
> for example,
> y: output
> u: input
> t: time
> F: my total equations
> y=F(x,t)
>
> i want to find the partial derivative of y to x --> dy/dx
> but my equations are not analytical so i need to do it by finite difference method.
> can you help please?

I have differentiated functions defined in programs containing for cycles, if-else statements etc with success via ADiMat http://www.sc.rwth-aachen.de/adimat/