## MATLAB: Functional derivative of anonymous function of parameters with known errors

functionsstatistical toleranciingstatistical tolerancing

Hi all, I have a fairly complicated function of time and several parameters:

f(t;p_1,…,p_k),

each of which has a known error {dp_1,…,dp_k} (which give 95% confidence intervals). I would like to plot this function along with confidence bands derived from these known bands.

Currently, I have my function written like this:

`p_1 = 1;p_2 = 2;...p_k = k;dp_1 = .1;...f = @(t) somefunction(t,p_1,...,p_k);`

Ideally, I would be able to generate two functions that I could then plot as bands around f, of the following form (D denotes the partial derivative)

`f+ = Df/Dp_1 * dp_1 + ... + Df/Dp_k * dp_k;f- = Df/Dp_1 * (-dp_1) + ... + Df/Dp_k * (-dp_k);`

to approximate the functional derivative. Does anybody have suggestions on the best way to calculate these functions?

*******************************************

Alternatively, I know that it’s easy to calculate the total derivative of f w/ respect to t (i.e., the non-parameter variable) — does anybody know of an easy way to establish relatively accurate upper and lower confidence bands on f(t) directly from f'(t) given confidence intervals for its parameters? It seems to me that you can’t get around needing some kind of knowledge about partial derivatives, but I’m adding this addendum to the question in case I’m wrong about that.

## Best Answer