spline2d

Splines in Two DimensionsThis demonstration interpolates data with a cubic spline in 2 dimensions. It uses MATLAB's SPLINE function. It does NOT use the Spline Toolbox, which is a complete set of functions for B-splines and other piecewise polynomials of any degree. Copyright 1984-2002 The MathWorks, Inc. $Revision: 5.10 $ $Date: 2002/04/08 20:04:53 $ Randomly pick eight points. Plot them. n = 7; x = rand(n,1); y = rand(n,1); plot(x,y,'.') axis([0 1 0 1])Interpolate the points with two splines by evaluating them with a finer spacing. Plot the interpolated curve with a red line. t = 1:n; ts = 1:1/10:n; xs = spline(t,x,ts); ys = spline(t,y,ts); hold on plot(xs,ys,'r'); hold off
Wyszukiwarka

Podobne podstrony:
SplineInv Res CSN
Splines
SplineInv Dims ANSIM
spline
SplineInv Dims ANSI
SplineInv Dims ISO
SplineInv Dims CSN
Spline1
Spline1Shaft
SplineInv Res ANSI
SplineInv Prop Common
Spline1ShaftMaterial

więcej podobnych podstron