fromData
Create a trajectory spline from raw x(t) and y(t) samples.
Declaration
self = fromData(t,x,y,options)
Parameters
tstrictly increasing shared trajectory parameter vectorxx-coordinate samples evaluated attyy-coordinate samples evaluated attoptions.Sspline degree shared by both coordinate splines
Returns
selfTrajectorySpline instance
Discussion
Use this factory when the coordinate components of a planar trajectory are known at the same parameter samples and should each be fit as a one-dimensional ConstrainedSpline.
The resulting component models satisfy
\[x(t_i) = x_i, \qquad y(t_i) = y_i,\]for each supplied sample pair x_i, y_i at parameter value t_i.
t = linspace(0, 1, 20)';
x = cos(2*pi*t);
y = sin(2*pi*t);
trajectory = TrajectorySpline.fromData(t, x, y, S=3);