MATLAB: Find Cartesian Coordinates of a 3D Spline Curve

3d3d curve3d splinecoordinatescscvnpointsspline

Hi everyone!
I'm trying to find the coordinates of a spline curve fitted to a 3D (X Y Z) dataset. I've tried looking into functions like fnval but it seems to be working only in 2D. 🙁
Here is the code I have written at the moment:
xyz=[0 0 0.9,0.01 0.2 0.93,0 0.5 1.4];
spline = cscvn(xyz);
npts = 3;
plot3(xyz(1,:),xyz(2,:),xyz(3,:),'ro','LineWidth',2);
text(xyz(1,:),xyz(2,:),xyz(3,:),[repmat(' ',npts,1), num2str((1:npts)')])
xlabel('X'); ylabel('Y'); zlabel('Z');
box on
hold on
fnplt(spline,'r',2)
Thank you all!

Best Answer

Answer to my own question:
[points] = fnplt(spline,'r',2);