Function Repository Resource:

# GeneralizedAkimaInterpolation

Interpolate data using Akima's method or modifications of it

Contributed by: Jan Mangaldan
 ResourceFunction["GeneralizedAkimaInterpolation"][{f1,f2,…}] constructs a cubic Hermite interpolation of the function values fi, assumed to correspond to x values 1, 2, …, using Akima's method. ResourceFunction["GeneralizedAkimaInterpolation"][{{x1,f1},{x2,f2},…}] constructs a cubic Hermite interpolation of the function values fi corresponding to x values xi using Akima's method.

## Details and Options

ResourceFunction["GeneralizedAkimaInterpolation"] returns an InterpolatingFunction object, which can be used like any other pure function.
The interpolation function returned by ResourceFunction["GeneralizedAkimaInterpolation"][data] is set up so as to agree with data at every point explicitly specified in data.
The function values fi are expected to be real or complex numbers.
The function arguments xi must be real numbers.
ResourceFunction["GeneralizedAkimaInterpolation"][data] generates an InterpolatingFunction object that returns values with the same precision as those in data.
ResourceFunction["GeneralizedAkimaInterpolation"] takes the following options:
 Method Automatic method to use PeriodicInterpolation False whether to treat the data as periodic
Possible settings for the Method option include:
 "AkimaClassic" classical Akima method (1970) "AkimaNew" new Akima method (1991) "ModifiedAkima" Ionita's modification of Akima's method
With the setting PeriodicInterpolationTrue, only the data for a single fundamental period are required.

## Examples

### Basic Examples (3)

Construct an approximate function that interpolates the data:

 In[1]:=
 Out[1]=

Apply the function to find interpolated values:

 In[2]:=
 Out[2]=

Plot the interpolation function along with the original data:

 In[3]:=
 Out[3]=

### Scope (2)

Interpolate between points at arbitrary x values:

 In[4]:=
 In[5]:=
 Out[5]=

Form an interpolation from data given as a TimeSeries:

 In[6]:=
 In[7]:=
 Out[7]=
 In[8]:=
 Out[8]=
 In[9]:=
 Out[9]=

### Options (2)

#### Method (1)

Compare different versions of Akima interpolation:

 In[10]:=
 In[11]:=
 In[12]:=
 Out[12]=

#### PeriodicInterpolation (1)

With PeriodicInterpolationTrue, the data is interpreted as one period of a periodic function:

 In[13]:=
 Out[13]=
 In[14]:=
 Out[14]=

### Properties and Relations (2)

Setting Method"AkimaClassic" in GeneralizedAkimaInterpolation gives results equivalent to the one from the resource function AkimaInterpolation:

 In[15]:=
 In[16]:=
 Out[16]=

The interpolant returned by GeneralizedAkimaInterpolation is continuous up to its first derivative:

 In[17]:=
 In[18]:=
 Out[18]=

## Version History

• 1.0.0 – 12 July 2021