plots spline
See also: ppval, spline, csape.
The following code
x = [ 0; sort(rand(25,1)); 1 ]; pp = csape (x, sin (2*pi*3*x), 'periodic'); axis([0,1,-2,2]); title('Periodic spline reconstruction of randomly sampled sine'); fnplt (pp,'r;reconstruction;'); t=linspace(0,1,100); y=sin(2*pi*3*t); hold on; plot(t,y,'g;ideal;'); hold off; axis; title("");
Produces the following figure
Figure 1 |
---|
Package: splines