B-spline Filter implementation in Matlab