Lovato Stefano - 2020-11-26

Dear Matt,

I am using GPOPS-II to solve optimal-control problems. I have a multi-variate spline interpolation, given as a pp-form, obtained with MATLAB functions (such as msapi) and thus evaluated by using fnval. Currently, I am using sparse finite-difference to obtain the derivatives, since ADiGator does not have fnval overloaded.

However, I know that Matlab can compute the derivatives of multi-variate interpolations using the function fnder. Would it be possible to write an overloaded version of fnval? Or do you think it would be too difficult? I would like to make the solver faster and more stable than using numerical differentation.

Many thanks.
Stefano Lovato

 

Last edit: Lovato Stefano 2020-11-26