MATLAB: How to find b spline values

bspline

Hello,
So I have some position data, I fitted a Bspline on the data and differentiate twice to get the accelerations. But now that I want to find the values of accelerations, I'm confused how to get that so I can divide them some number for normalization. So are the y values of a curve fitted by a bspline same as coefficients? I attached the spline, I need to find the y values of 101 points of this figure.

Best Answer

After computing the derivative
spline_position = spaps(time ,x,0,3); % x is a 101 element vector representing postion, I'm fitting a 5th order bspline
acceleration = fnder(spline_position,2); % this gives me a struct, I need to have a 101 acceleration vector corresponsing to each x
run this to evaluate the acceleration
a = fnval(acceleration, time)
Related Question