Checked content

File:Interpolation example spline.svg

Summary

Description IIllustration of spline interpolation of a data set. The same data set is used for other interpolation algorithms in the Interpolation.
Date 26 June 2007
Source self-made in
Author Berland

Based on png-version by User:Jitse Niesen (with gnuplot source code), and on svg-version by User:Cronholm144.

Gnuplot source code

set terminal svg fname "Vera" fsize 25
set output "Interpolation_example_spline.svg"
set key off
set xzeroaxis
set xtics axis 1,1
set ytics nomirror 1
set samples 300
set border 2
f(x) = (x >= 0 && x < 1) ? -0.1522*x**3 + 0.9937*x : \
       (x >= 1 && x < 2) ? -0.01258*x**3 - 0.4189*x**2 + 1.4126*x - 0.1396 : \
       (x >= 2 && x < 3) ? 0.1403*x**3 - 1.3359*x**2 + 3.2467*x - 1.3623 : \
       (x >= 3 && x < 4) ? 0.1579*x**3 - 1.4945*x**2 + 3.7225*x - 1.8381 : \
       (x >= 4 && x < 5) ? 0.05375*x**3 -0.2450*x**2 - 1.2756*x + 4.8259 : \
                           -0.1871*x**3 + 3.3673*x**2 - 19.3370*x + 34.9282 
set yrange [-1.1:1.1]
plot f(x) with lines linetype 3 linewidth 4, \
     "-" with points linetype 1 pointtype 7 pointsize 0.7,\
         0 with lines linetype -1 linewidth 1
0 0
1 0.8415
2 0.9093
3 0.1411
4 -0.7568
5 -0.9589
6 -0.2794
e

Please use at least version 4.2 of Gnuplot for smooth lines in SVG.

Licensing

Public domain This work has been released into the public domain by its author, I, Berland. This applies worldwide.
In some countries this may not be legally possible; if so:
I, Berland grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

The following pages on Schools Wikipedia link to this image (list may be incomplete):

Metadata

About Schools Wikipedia

Schools Wikipedia has been carefully checked to give you the best learning experience. By supporting vulnerable children right through to adulthood, SOS Childrens Villages makes a lasting difference to the lives of thousands of people. Education is a key part of our work, and our schools provide high-quality teaching to the children in our care. Sponsoring a child is the coolest way to help.