Code covered by the BSD License  

Highlights from
Mth Order Piecewise Spline Interpolation

5.0

5.0 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 3.81 KB File ID: #22912
image thumbnail

Mth Order Piecewise Spline Interpolation

by Husam Aldahiyat

 

07 Feb 2009 (Updated 09 Feb 2009)

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

| Watch this File

File Information
Description

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

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
MATLAB Earthquake

MATLAB release MATLAB 7.4 (R2007a)
Other requirements Acknowledged file MATLAB Earthquake (Optional)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
09 Jun 2009 badr Higab

great code

26 Jan 2010 Jon Griffiths

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

26 Jan 2010 Husam Aldahiyat

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

18 Apr 2011 Oday  
Please login to add a comment or rating.
Updates
09 Feb 2009

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

Tag Activity for this File
Tag Applied By Date/Time
splines Husam Aldahiyat 09 Feb 2009 10:30:03
gui Husam Aldahiyat 09 Feb 2009 10:30:04
general Husam Aldahiyat 09 Feb 2009 10:30:04
piecewise Husam Aldahiyat 09 Feb 2009 10:30:04
interpolation Husam Aldahiyat 09 Feb 2009 10:30:04

Contact us at files@mathworks.com