Home Login  |   Contact  |   About Us       Wednesday, July 6, 2022   

j0110924 - Back to Home
   Skip Navigation LinksHOME ›  AREAS OF EXPERTISE ›   Interpolation Apps ›  ~ Cubic Spline Method



Skip Navigation Links.



"Interpolation Solutions"
Cubic Spline Method
X =
Y =

Array X = { , , , , }
Array Y = { , , , , }
Specify New X values = { , , }



[ Initial ArrayValues X: {0,2,4,6,8} ]
[ Initial ArrayValues Y: {0,4,16,36,64} ]
[ Initial SplineX Values specified: {3,5,7} ]

IMPLEMENTATION
Cubic Spline Interpolation

This method provides a great deal of smoothness for interpolations with significantly varying data. It uses weight coefficients on the cubic polynomials to interpolate the data. These coefficients bend the line so that it passes through each of the data points without any erratic behavior or breaks in continuity.

Algorithm Creation

The basic idea of the cubic spline is actually based on a third degree polynomial defined by,

si(x) = ai(x - xi)3 + (x - xi)2 + ... for i=1,2,...n-1


Testing the Cubic Spline Method

In order to test the Spline method as defined above, a new TestSpline() static method has been added and executed. Supporting code and methods are not shown.

           static void TestSpline();
              {
                 ListBox1.Items.Clear();
                 ListBox2.Items.Clear();
                 double[] xarray = new double[] { t1, t2, t3, t4, t5 };
                 double[] yarray = new double[] { t6, t7, t8, t9, t10 };
                 double[] x = new double[] { t11, t12, t13 };
                 double[] y = Interpolation.Spline(xarray, yarray, x);
                 VectorR vx = new VectorR(x);
                 VectorR vy = new VectorR(y);
                 ListBox1.Items.Add(" " + vx.ToString());
                 ListBox2.Items.Add(" " + vy.ToString());
              }

We first defined a set of data points as xarray and yarray. We then compute the y values at the xSpline values specified. The user can manipulate all values and try variations on the arrays themselves as well as specifying new xSpline values.



Other Implementations...


Object-Oriented Implementation
Graphics and Animation
Sample Applications
Ore Extraction Optimization
Vectors and Matrices
Complex Numbers and Functions
Ordinary Differential Equations - Euler Method
Ordinary Differential Equations 2nd-Order Runge-Kutta
Ordinary Differential Equations 4th-Order Runge-Kutta
Higher Order Differential Equations
Nonlinear Systems
Numerical Integration
Numerical Differentiation
Function Evaluation


Consulting Services - Back to Home
Home

Home Math, Analysis,
  expertise..."

EIGENVALUE
SOLUTIONS...


> Rayleigh-Quotient Method

> Cubic Spline Method

 

Applied Mathematical Algorithms

Home

ComplexFunctions

Home

NonLinear
Home

Differentiation
Home

Integration
About Us


KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms.
Areas of
Expertise


SpecialFunctions
VectorsMatrices
OptimizationMethods
ComplexNumbers
Interpolation
CurveFitting
NonLinearSystems
LinearEquations
DistributionFunctions
NumericalDifferentiation
NumericalIntegration
DifferentialEquations
Smalltalk
FiniteBoundary
Eigenvalue
Graphics
Understanding
Mining


MiningMastery
MineralNews
MineralCommodities
MineralForum
Crystallography
Services


NumericalModeling
WebServices
MainframeServices
OutsourceServices

LINKED IN
KMP ARTICLES
Brand





Home

Login

Contact
Since 2006 All Rights Reserved  © KMP Software Engineering LINKS | PRIVACY POLICY | LEGAL NOTICE