Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Derive_v5_05 / Derive / SPLINE

.doc
Скачиваний:
14
Добавлен:
02.06.2015
Размер:
2.86 Кб
Скачать
SPLINE_S.DOC - by Steven Schonefeld

     The file  SPLINE_S.MTH  contains procedures for generating a "natural"
cubic spline (in parametric form) for a matrix  m_  of points.  The function 
SPLINE(m_, t)  expects the x-coordinates of the points contained in  m_  to
be in increasing order.  When you [E]xpand  SPLINE(m_, t),  you get a matrix
SS.  Each row of  SS  is a vector representing parametric equations for a
segment of the desired spline.  These parametric equations should be
[P]lotted using  0 (zero) for the lower limit and  1 (one) for the upper
limit of the parameter  t.  Once the limits (0 and 1) have been set, you may
plot all the parametric equations at once with:  [Ctrl Enter].  

     In case you are interpolating a specific function  F(x),  you may use
the function  DIFFERENCE(SS)  to generate a matrix of parametric equations
for the difference between the spline  SS  and the function  F(x).  The
function  PARA(m_, t)  does not require the  x-coordinates of  m_  to be in
increasing order.  It will give a matrix of parametric equations  
[P(t), Q(t)]  that will smoothly connect the points in matrix  m_.  In all
cases, the matrices of parametric equations should be plotted using  0  and 
1  for the limits on the parameter.

     In the following examples,  #29  was [E]xpanded to give the matrix  #30 
of parametric equations for the natural cubic spline that will interpolate
the matrix of points:  [[1, 1], [3, 2], [4, 2], [5, 3]].  Line  #32  was
[E]xpanded to give the spline matrix  #33  that will interpolate the function 
F(x)  at the points having  x-coordinates  0, 0.5, 1, .., 6.5, 7.  We next,
[A]uthored and expanded  DIFFERENCE(#33)  to get the spline matrix  #35.  We
may [P]lot  #35  to see how close the spline comes to the function  F(x). 
Finally, #36  was [E]xpanded to give the matrix  #37  of parametric equations
that smoothly connect the closed rectangle:  [[0, 0], [3, 0], [3, 2], [0, 2],
[0, 0]].

#29: SPLINE([[1, 1], [3, 2], [4, 2], [5, 3]], t)

#30: [[2 t + 1, -0.521739 t^3 + 1.52173 t + 1],
      [t + 3  ,  0.413043 t^3 - 0.391304 t^2 - 0.0217391 t + 2],
      [t + 4  , -0.282608 t^3 + 0.847826 t^2 + 0.434782 t + 2]]

#31: F(x) := SIN(x) + COS(x/2)

#32: SPLINE(VECTOR([x, F(x)], x, 0, 7, 0.5), t)

#33: [[0.5 t, -0.0333467 t^3 + 0.481684 t + 1], .. (rest of matrix omitted)

#34: DIFFERENCE(#33)

#35: [[0.5 t, -COS(0.25 t) - SIN(0.5 t) - 0.0333467 t^3 + 0.481684 t + 1],
     .. (rest of matrix omitted)

#36: PARA([[0, 0], [3, 0], [3, 2], [0, 2], [0, 0]], t)

#37: [[3.53571 t - 0.535714 t^3, 0.642857 t^3 - 0.642857 t],
     .. (rest of matrix omitted)

     For more information on cubic splines see the book:  NUMERICAL ANALYSIS
via DERIVE, by Steven Schonefeld, MathWare, 604 E Mumford Dr., Urbana, IL
61801  1-800-255-2468.

Соседние файлы в папке Derive
  • #
    02.06.20154.88 Кб13FirstOrderODEs.mth
  • #
    02.06.20154.39 Кб13ROMB_INT.doc
  • #
    02.06.2015899 б12ROMB_INT.MTH
  • #
    02.06.20151.9 Кб15SECANT.doc
  • #
    02.06.2015371 б12SECANT.MTH
  • #
    02.06.20152.86 Кб14SPLINE.doc
  • #
    02.06.20151.79 Кб13SPLINE.MTH