ADiGator + GPOPS-II: Problems with splines and fnval function
A MATLAB Automatic Differentiation Tool
Brought to you by:
anilvrao2,
weinstein87
Hello,
I am trying to use ADiGator on my GPOPS-II implementation. However, when I run the code, the tool is not able to generate the derivatives of the continuous function. Running the "adigatorGenFiles4gpops2" function, this error appears:
Error using fn2fm (line 53)
Input is not a function.
Error in fnval (line 52)
f = fn2fm(f);
Error in adigatortempfunc1 (line 38)
st_ik = (fnval(splines.st_pp, t))';
Error in adigator (line 510)
FunctionInfo = adigatortempfunc1(FunctionInfo,UserFunInputs);
Error in adigatorGenFiles4gpops2 (line 204)
adigator(ContFunc,{cinput},ContDeriv1,ADopts);
It seems ADiGator has a problem with splines and fnval function. Nevertheless, I need to use these functions as I have experimental data on my optimization and I resample it according to the collocation points GPOPS-II employs in each iteration.
I do not know how to deal with that. Any help would be really appreciated. I can attach my files or give you more details if needed.
Many thanks.
Roger,
The issue is that adigator doesn't have fnval overloaded. You should, however, be able to represent your spline as a piece wise polygon and use ppval which adigator supports.
Matt
Matthew,
Ok, I see. Thank you very much for your answer.