Dear all,
I want to provide the analytical Jacobian of the eigenvalues D of a matrix A via callbacks (in particular I am interested in the damping ratios to be used within an optimization).
When running the code, I get the following error:
In alternative, by typing "jac = jacobian(g,x);", I get the following error:

Note that, in the eval method of the jacobian, I commented my implementation to make sure the outputs is of the correct shape.
Any help on resolving this errors? I would be extremely grateful.
PS. the derivatives of the eigenvalues can be obtained if the derivative of A and the eigenvalues themselves are known (they can be evaluated numerically only once). This problem seems relevant also to others.
Thanks in advance,
Filippo