When using repeated indices in an index expression, for example x([2 2 2]), the RM differentiation will return wrong results.
Ignoring output arguments using tilde (example: [~, S, ~] = svd(A)) is not supported because our parser is not able to recognize it. Dummy variable names must be used instead: [dummy, S, dummy] = svd(A)
When an index expression x(i) is assigned and the RHS is a non-active function call f(...), admDiffFor will afterwards clear the entire variable g_x and not just g_x(i). Workaround: use a temporary variable, like this:
tmp = f(...); x(i) = tmp;
For certain builtins, whos derivative have been added to ADiMat, some partials are still missing. This means that you cannot differentiate those builtins w.r.t. certain parameters. The partial derivatives w.r.t those parameters are treated as zero, and unfortunately in most of the cases there will not even be a warning or error message. The following list attempts to collect the cases were we think that a builtin is differentiable w.r.t a certain parameter but the AD modes of ADiMat cannot compute that partial:
norm(., P)
norm cannot be differentiated w.r.t to the second parameter P (the parameter p of the p-Norm)
interp1(X,.,.,METHOD,.)
interp1 cannot be differentiated w.r.t to the first parameter X (points were values are given) when METHOD is not 'linear'
besselh(NU,.,.)
, besseli(NU,.)
, besselj(NU,.)
,
besselk(NU,.)
, bessely(NU,.)
Bessel functions cannot be differentiated w.r.t. the first parameter NU (order)
As stated in Is the derivative assignment put in front of the orginial expression? admDiffFor will in some instances reuse the LHS of an assignment in derivative computations, like this:
z= a/ b; g_r(1: l, 1)= (b' \ (g_a' - g_b' * z' ))' ;
r(:)= a/ b; g_r(1: l, 1)= (b' \ (g_a' - g_b' * r(:)' ))' ;
tmp= a/ b; r(:)= tmp;