use matlab engine to calculate b-spline