File Exchange

image thumbnail

Mth Order Piecewise Spline Interpolation

version 1.2 (52 KB) by

A GUI that plots and gives equations for variable order intermediate splines.

4 Downloads

Updated

View License

GSP is a graphical user interface which takes x and y points as inputs, along with the order m, then outputs mth order splines between each of the x points. In most cases additional constraints are to be entered as well.
  
  Example:
  
  Input:
  
  x points : [1 2 3 4]
  y points : [2 7 -1 5]
  Order : 2
  *One Additional Constraint is Required*
  f '' (1) = 0
  
  Output:

  Polynomials:
    0 5 -3
  -13 57 -55
   27 -183 305
  
  In the Range:
  1 2
  2 3
  3 4
  
  This means the following:
  
  for 1 < x < 2 y = 0*x^2 + 5*x - 3
  for 2 < x < 3 y = -13*x^2 + 57*x - 55
  for 3 < x < 4 y = 27*x^2 - 183*x + 305

Comments and Ratings (4)

Oday

Oday (view profile)

Husam Aldahiyat

Yes, manually put (paste) the points in the x and y edit boxes.

Jon Griffiths

Could the author clarify how to enter data points?
Or is it intended to do this manually!

badr Higab

great code

Updates

1.2

Updated to include an App file for R2012b

1.1

Corrected bug, added continuity button and integrated examples, improved code.

MATLAB Release
MATLAB 8.0 (R2012b)
Acknowledgements

Inspired by: MATLAB Earthquake

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video