Hi Ehtisham,
To obtain a set of points along the spline, you can sample it at a finite number of locations. By generating a vector of parameter values you can evaluate the spline at these specific points.
Please refer to the below code for better understanding:
curve = cscvn(xyz(:,:));
t = linspace(curve.breaks(1), curve.breaks(end), 50); 
points = fnval(curve, t);
% Extract x, y, z coordinates
x = points (1, :);
y = points (2, :);
z = points (3, :);
“linspace” is a MATLAB function that generates a linearly spaced vector. Above will creates 50 evenly spaced values between the first and last breakpoints of the spline. These values can be used to evaluate the spline. “fnval” evaluates the spline at each of these parameter values.
You may refer to the below MathWorks documentation to know more on “linspace” and “fnval” :


