Code covered by the BSD License  

Highlights from
Interpolation Utilities

5.0
5.0 | 3 ratings Rate this file 63 Downloads (last 30 days) File Size: 34.9 KB File ID: #36800 Version: 1.27

Interpolation Utilities

by

 

22 May 2012 (Updated )

A variety of interpolation utilities

| Watch this File

File Information
Description

This zip file contains 29 functions related to interpolation. The functions are:
1) baryinv.m performs barycentric interpolation with inverse distance weighting
2) cakima.m performs piecewise cubic Akima interpolation
3) cbezier.m performs piecewise cubic Bezier spline interpolation
4) chermite.m performs piecewise cubic Hermite spline interpolation
5) cosint.m performs piecewise cosine interpolation
6) cubiconv.m performs cubic convolution interpolation
7) divdiff.m calculates divided differences
8) expint.m calculates piecewise exponential interpolation
9) floaterhormann.m performs rational interpolation using the Floater-Hormann Method
10) fractint.m performs self-affine fractal interpolation for specific interpolation points
11) hermint.m performs piecewise Hermite interpolation
12) interpdct.m performs interpolation using the DCT method
13) lagint.m performs piecewise Lagrange interpolation
14) mqspline.m performs piecewise monotone quadratic spline interpolation
15) neville.m performs interpolation using Neville's Method
16) newtint.m performs interpolation of equally-spaced points
17) qhermite.m performs piecewise quintic Hermite interpolation
18) ratint.m performs simple rational polynomial interpolation
19) rchermite.m performs piecewise rational cubic Hermite spline interpolation
20) safif.m performs self-affine fractal interpolation
21) said.m performs piecewise Said interpolation
22) schwerner.m performs rational interpolation using the Schneider-Werner Method
23) shermite.m performs piecewise septic Hermite interpolation
24) sincdint.m performs piecewise discrete sinc interpolation
25) sincint.m performs piecewise sinc interpolation
26) steffen.m performs monotonic Steffen interpolation
27) stineman.m performs monotonic Stineman interpolation
28) thiele.m performs rational Thiele interpolation
29) trigint.m performs piecewise trigonometric interpolation

Required Products MATLAB
MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
25 Mar 2015 Andreas

Hi,

One more issue with mqspline. In code line 84, it should be
yp(1) = (3*d(1) - yp(2))/2;
instead of
yp(1) = -(3*d(1) - yp(2))/2;

The additional minus is a typo in Judd (1998), "Numerical Methods in Economis". I asked him and he confirmed. In the original paper (Schumaker (1983), "On Shape Preserving Quadratic Spline Interpolation") Kenneth Judd is referring to, there is no minus.

Obviously, this matters for the interpolation at the left end.

Kind regards,
Andreas

Comment only
24 Mar 2015 Andreas

Hi,

Thanks a lot for the codes. I'm using mqspline.m.

I think that there is an error in both lines 126 and 129. It should be

eps = x(klo) + h*(b-del)/(b-a);
eps = x(khi) + h*(a-del)/(b-a);

instead of

eps = x(klo) + 2*h*(b-del)/(b-a);
eps = x(khi) + 2*h*(a-del)/(b-a);

See Schumaker (1983), "On Shape Preserving Quadratic Spline Interpolation", or the exposition in Judd (1998), "Numerical Methods in Economis", for the formulae.

Kind regards,
Andreas

Comment only
19 Dec 2014 MARXIM RAHULA BHARATHI BOOPATHI RAJAN  
25 Jun 2014 Rody Oldenhuis

Rody Oldenhuis (view profile)

 
08 Feb 2014 Grzesiek

Sorry for my last comment. Everything is alright. My mistake. Data were not equally spaced.

Very good utilities. Thanks

08 Feb 2014 Grzesiek

in newtint.m file there is an error in Everett's method (line 163) and Stirling's method (line 136).

Error msg: newtint: A(I,J): row index out of bounds; value 5 out of bound 4

I tried to execute the following command:

y = [308.6 362.6 423.3 491.4];
x = [0.055389 0.047485 0.040914 0.035413];
c = 4; %c=3
newtint(x,y,[0.04],c)

Comment only
Updates
17 Aug 2012 1.1

Changed the finite difference calculation in chermite.m
Added a septic hermite interpolator, shermite.m

12 Sep 2012 1.2

Modified sincdint.m and sincint.m and added trigint.m

01 Oct 2012 1.6

Updated sincint.m

15 Oct 2012 1.7

Added finite difference function to rchermite.m

16 Oct 2012 1.8

updated epsilon computations

17 Oct 2012 1.9

updated trigint.m

25 Oct 2012 1.11

Added said.m for piecewise Said interpolation

26 Oct 2012 1.12

added comment to said.m

01 Nov 2012 1.13

updated trigint.m

02 Nov 2012 1.14

updated trigint.m to handle an even number of datapoints

05 Nov 2012 1.15

updated monotone condition in chermite.m

12 Nov 2012 1.16

Updated output arguments when error conditions occur

13 Nov 2012 1.18

added mqspline.m and harmonic mean monotone options

27 Nov 2012 1.20

Added expint.m; added second derivative calculations to lagint.m and hermint.m

27 Nov 2012 1.19

added expint.m

25 Jan 2013 1.21

Modified window condition in sincint.m

18 Nov 2013 1.22

Added fractint.m and safif.m and added a fractional delay filter to interpdct.m

31 Dec 2013 1.24

Added boundary conditions to helper function in newtint.m

10 Feb 2014 1.25

Changed kernel tolerance in schwerner.m

26 Aug 2014 1.26

Added steffen.m and stineman.m for monotonic interpolation

04 Sep 2014 1.27

Added ratint.m and thiele.m for rational polynomial interplation

Contact us