i'm using spapi to build interpolating splines where the y value and its first derivative are specified:
spline1=spapi(knots,5,[x x],[y yprime])
where (x,y) are my interpolating points and (x,yprime) are the first derivative of y at x.
I'd like to use optknt to improve the distribution of the knots in the spline but it requires the interpolating points to non decreasing.
Gives an error whilst
Doesnt give the appropriate number of knots for the number of interpolating conditions.
Is there an different method, option or function that can optimise the knot placement in this situation?