Create matrix in spline class