Questions on the interpolation functions in Mathematica (Interpolation[], ListInterpolation[], FunctionInterpolation[], InterpolatingPolynomial[], etc.)

learn more… | top users | synonyms

26
votes
1answer
491 views

What's inside InterpolatingFunction[{{1., 4.}}, <>]?

I'm curious what's inside the InterpolationFunction object? For example: ...
19
votes
4answers
1k views

How to integrate functions of linearly interpolated data?

At first, consider integration of pure InterpolatingFunction. Importing some data (works in v.9, for earlier versions one can use this link to download zipped ...
17
votes
4answers
892 views

How to splice together several instances of InterpolatingFunction?

I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
5
votes
2answers
342 views

How to make BSplineFunction pass each data point and naturally smooth?

(Old package, works good) ...
15
votes
2answers
977 views

Improved interpolation of mostly-structured 3d data

This question arose in response to a comment by Leonid to my answer for this question. He noted that for unstructured grids, Interpolation can only use ...
5
votes
1answer
2k views

How do I prevent NIntegrate::inumr errors within other functions?

I believe this question is best illustrated with a simple example. If I run FunctionInterpolation[NIntegrate[a + b, {a, 0, 1}], {b, 0, 1}] I get errors of the ...
15
votes
3answers
2k views

Data interpolation and ListContourPlot

I am fairly new to Mathematica and I have two quick questions on using it for a Hydrology and Hydrogeology class. One is about data interpolation and interpolating without any data defined in an area. ...
20
votes
7answers
2k views

Finding the intersection of a curve with an interpolation function

There are no issues trying to find the intersection points of two defined curves. ...
12
votes
2answers
271 views

Extracting the function from InterpolatingFunction object

I've used Interpolation[] to generate an InterpolatingFunction object from a list of integers. ...
15
votes
4answers
3k views

Getting the interpolation function from a list plot

I have conducted a chemistry experiment and obtained a list of concentrations of a reactant against time. I plot a graph of this using Mathematica's ListPlot ...
11
votes
2answers
5k views

interpolation of 3D data

I have a 3D surface given in data-points of the form ${x,y,z}$. What is the easiest way to get the interpolated value $z=f(X,Y)$ for given coordinates ${X,Y}$ (which are of course not in the data ...
7
votes
3answers
3k views

Get polynomial interpolation formula

I'm attempting to get a polynomial interpolation formula out of Mathematica but I am absolutely lost. I stared out using ...
16
votes
1answer
403 views

How to fix broken InterpolatingFunction?

I have an InterpolatingFunction based on irregularly-gridded data, like this: ...
26
votes
4answers
338 views

How can the behavior of InterpolationOrder->0 be controlled?

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
8
votes
4answers
859 views

Numerical integration of a numeric data available as a nested list

I have some numerical data in the form of a list with the following structure: {...{x,y,z},...} defining a surface z=z(x,y) in a 3D space (x,y,z). The data came from a simulation, and I am ...
5
votes
2answers
577 views

ListContourPlot interpolation screws up on concave set of data

I want to create ListContourPlots for sets of Data (from a physics simulation) given as Triplets {x, y, f(x, y)}. Certain parameter regions in the x-y-plane are ...
7
votes
1answer
640 views

Getting an InterpolatingFunction from a ContourPlot

I have a function, say minimizeme[Ω_][β_][ϵ_] = ϵ^2 Ω - Log[2 (Cosh[2 β] + Cosh[2 β ϵ])]/(2 β); I want to find its critical points in $\epsilon$ for a given ...
16
votes
2answers
1k views

Higher order periodic interpolation (curve fitting)

I have a list of points in 3D, and I want to get a smooth interpolation or curve fit (it is more for illustration) of these points such that the first and second derivatives at the start and end ...
12
votes
2answers
256 views

Arbitrary precision spline interpolation

Current implementation of Interpolation does not allow arbitrary precision spline interpolation. Yu-Sung Chang say here that "it is not hard to implement it ...
6
votes
2answers
2k views

Is it possible to compute trapezoidal rule numerical integration?

Is it possible to compute trapezoidal rule numerical integration? I know that Mathematica has Interpolation, and that a list of points can be interpolated and then ...
3
votes
1answer
808 views

Interpolating 2D data with missing values

I have a list (21 x 21) containing values. I want to eliminate slots containing zeros by interpolating the nearest values and overwriting the zeros. How do I use the Mathematica's ...
5
votes
2answers
476 views

Finding a 3d curve from torsion and curvature with NDSolve

I'm trying to use the Frenet–Serret formulas to find the curve that matches the torsion and curvature I specify numerically with an InterpolatingFunction. The ...
2
votes
1answer
276 views

Interpolation on large 2D list results in erratic function

Previously, I've had problems with Mathematica interpolating and plotting 3D lists, but I finally managed to do so by rescaling the x and y-axes with the help of the methods proposed here. Now my ...
22
votes
2answers
2k views

Joining and interpolating data points

I wonder what is the best practice for interpolating curves? Usually I'm using BSplineCurve and adjusting SplineWeights so it ...
27
votes
2answers
4k views

How does Interpolation really work?

I'm looking for some explanation or advice, not help in solving something. Recently I finished my program and my supervisor said "Ok, now it's time for your first paper: write a scientific text about ...
17
votes
4answers
835 views

Generating an “average curve” from a dense set of “semicontinuous curves” which clear trends

This question is related to a previous one of mine: Partitioning a superset of coordinates into subsets that generate continuous curves, where the challenge was to partition a data set into two ...
9
votes
2answers
225 views

Partitioning a superset of coordinates into subsets that generate continuous curves

Consider the data set corresponding to recorded trajectories for a particle: ...
8
votes
3answers
926 views

Ηow to create an interpolated CDF from its samples?

I want to use a distribution I have only aggregate statistics on, namely its CDF sampled at certain points. I would like to keep it "nonparametric" (remain noncommittal on the parametric form), but I ...
13
votes
4answers
568 views

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
11
votes
1answer
185 views

Incompatible InterpolatingFunction between V9 (and earlier) and V10

Bug introduced in 10.0.0 and fixed in 10.0.1 I am encountering compatibility issues when loading DumpSave(d) definitions in V10 that have been created with ...
4
votes
3answers
721 views

Smooth 4D (3D + color) plot from discrete points

I have a file containing isosurface $\{x,y,z,F\}$ data (around 9000 points). My goal is to generate a smooth (NOT a discrete set of points!) colored surface using ...
9
votes
2answers
667 views

Interpolation of mostly-structured 3D data

this question relates to interpolation of 3D data and Improved interpolation of mostly-structured 3d data I have an irregular 3d data set that is quite large (around 70,000 triplets---let's call it ...
3
votes
2answers
176 views

Interpolating a sparse list of two-dimensional coordinates

I've run into a problem where I have an ordered array of sets of coordinates, for example: ...
-1
votes
1answer
76 views

Reduced interpolation order [closed]

I have a problem with Interpolation - the order is reduced to 1 no matter what, but I need a quadratic interpolation order. The ...
15
votes
3answers
899 views

Monotone, periodic 1d-interpolation with continuous 1st order derivative

Lately, we had this thread about interpolation where J. M. linked two interpolation methods. The background for my question is that I estimated a parameter in polar coordinates with dependence on the ...
28
votes
3answers
982 views

No warning when extrapolating with Plot

One of the most annoying "features" of Mathematica is that the Plot family does extrapolation on InterpolatingFunctions without ...
10
votes
1answer
574 views

How to get zeroth-order (piecewise constant) interpolation of scattered data?

Given a collection of scattered data points in 2D and associated function values, data = RandomReal[1, {100, 3}]; we can get a piecewise linear interpolating ...
3
votes
4answers
298 views

Interpolating a plot with missing values

With data = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 5}, {8, 4}, {10, 3}, {10, 2}, {11, 1}} and ...
4
votes
0answers
62 views

Interpolation on an unstructured (mostly-structured) grid in 4D+

I frequently need to perform interpolations on an unstructured grid. Mostly, with the purpose of filling grid holes and then later continue with regular grid interpolations. Mathematica V9 and V10 ...
11
votes
3answers
931 views

Derivatives (divergence, gradient, curl) of interpolated 3D data

How can I calculate a vector derivative (i.e. divergence, gradient, curl) of interpolated data? For sample data, you can use: ...
6
votes
2answers
119 views

2D smoothing spline interpolation

Does Mathematica have 2D smoothing spline interpolation built in? I requires an interpolation method with smooth first derivatives and cubic bivariate splines fulfill this nicely. In python I would ...
9
votes
1answer
229 views

The only usage for the option InterpolationOrder in NDSolve is to be set to All?

We know that changing the option InterpolationOrder in ListLinePlotListPlot3D、...
8
votes
1answer
130 views

Prevent Plus from threading InterpolatingFunction

For an InterpolatingFunction $y:\ \mathbb{R}\to\mathbb{R}^2$, Plus is unaware of this, so when I do any modifications to it in ...
6
votes
1answer
396 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
4
votes
3answers
804 views

Creating a 3D List Line Plot From Discrete Points

Given the following Runge-Kutta ODE solver and the graphical output below, how do I get a 3D line plot instead of a 3D point plot? I see that there is no ListLinePlot3D function, so I thought it might ...
4
votes
3answers
338 views

How could I get the value of y[t] at each specific interpolation point?

sol = NDSolve[{Derivative[2][y][t] + Sin[y[t]] == 0, Derivative[1][y][0] == 0, y[0] == 1}, y, {t, 0, 2}] the above-mentioned differential equations can be solved ...
3
votes
2answers
695 views

Parametric differentiable interpolation of a 2D data set

I have a set of data ...
3
votes
2answers
272 views

Convert BSplineFunction into two Interpolating Functions

Is there a way to decompose a BSplineFunction output into two functions x[t], y[t] ...
2
votes
1answer
77 views

ReplaceAll in an expression including large InterpolatingFunction

I have a large InterpolatingFunction that I'm transforming to another basis with a few simple multiplications and additions by (symbolic) constants. The ...
15
votes
1answer
359 views

Why does LogLinearPlot sample its argument outside the specified domain?

I experience a weird bug in the function LogLinearPlot. If the input is an interpolation function, such as the one created like this, ...