MATLAB: Curve regression in 3D space and speed calculation at any point

curve fittingMATLABsol

I'm trying to find the equation of the curve (3d) to be able to calculate the velocity at any point in space, I couldn't find any function that I could perform to adjust the curve (like fit for 2D), My data set is taken from Excel files with more than 500 x 9 double, a part of the file follows below and each file has different number of lines.
X Y Z Vel
61.2566 -150.047 411 303.7
61.2521 -150.044 381 300
61.2478 -150.042 351 298.2
61.2435 -150.039 320 292.6
61.2392 -150.037 297 294.5
Thanks for any help…

Best Answer