# Multi Dimensional Cubic Spline

**URL:** https://discourse.julialang.org/t/multi-dimensional-cubic-spline/71687
**Category:** General Usage
**Tags:** interpolations, splines
**Created:** [November 17, 2021, 10:01pm UTC](https://discourse.julialang.org/t/multi-dimensional-cubic-spline/71687 "2021-11-17T22:01:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tgautam03](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tgautam03/32/20545_2.png) [@tgautam03](https://discourse.julialang.org/u/tgautam03)
#### Post date: [November 17, 2021, 10:01pm UTC](https://discourse.julialang.org/t/multi-dimensional-cubic-spline/71687/1 "2021-11-17T22:01:45Z")

</div>

Hi, I’ve a multi dimensional dataset (3 features and 1 label) and want to interpolate using cubic splines. I have found several documentations on interpolation in 2D but can’t find anything that’ll help with this. Looking forward to any suggestions.

Thanks.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [November 17, 2021, 10:47pm UTC](https://discourse.julialang.org/t/multi-dimensional-cubic-spline/71687/2 "2021-11-17T22:47:23Z")

</div>

> [@tgautam03](#):
>
> Hi, I’ve a multi dimensional dataset (3 features and 1 label) and want to interpolate using cubic splines. I have found several documentations on interpolation in 2D but can’t find anything that’ll help with this. Looking forward to any suggestions.

Is the data on a cartesian grid? If so, it should be straightforward to recursively define a 1d spline of 1d splines of 1d splines (by making splines of the coefficients)…

---

<div class="post-metadata">

### Author: ![tgautam03](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tgautam03/32/20545_2.png) [@tgautam03](https://discourse.julialang.org/u/tgautam03)
#### Post date: [November 18, 2021, 4:08am UTC](https://discourse.julialang.org/t/multi-dimensional-cubic-spline/71687/3 "2021-11-18T04:08:05Z")

</div>

Can you mention any resources that’ll help me implement this effectively. My data is structured such that `M*g` is the label. I’m showing a few points but I’ve around 18k of them.

```julia
# a/c	a/t	phi M*g
0	0.2	0.2	0.162	1.24187
1	0.2	0.2	0.261	1.20996
2	0.2	0.2	0.423	1.18170
3	0.2	0.2	0.581	1.15911
4	0.2	0.2	0.739	1.16206

```

---

<div class="post-metadata">

### Author: ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)
#### Post date: [November 18, 2021, 5:20am UTC](https://discourse.julialang.org/t/multi-dimensional-cubic-spline/71687/4 "2021-11-18T05:20:30Z")

</div>

Radial Basis Functions are a common way to do multidimensional interpolation or more generally function approximation.

They are also relatively easy to understand usually infinitely smooth, and have nice rapid convergence properties for many cases.
