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

learn more… | top users | synonyms

28
votes
3answers
776 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 ...
25
votes
4answers
297 views

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

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
24
votes
2answers
3k 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 ...
22
votes
1answer
405 views

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

I'm curious what's inside the InterpolationFunction object? For example: ...
19
votes
2answers
1k 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 ...
18
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 ...
16
votes
5answers
798 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. ...
16
votes
2answers
943 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 ...
16
votes
4answers
754 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 ...
16
votes
1answer
382 views

How to fix broken InterpolatingFunction?

I have an InterpolatingFunction based on irregularly-gridded data, like this: ...
15
votes
2answers
1k views

Fast Spherical Linear Interpolation of list of quaternions

An accurate way to interpolate between two quaternions is to use Spherical Linear Interpolation (Slerp) because it preserves the unit length, whereas straightforward linear interpolation does not, as ...
15
votes
1answer
325 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, ...
15
votes
2answers
831 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 ...
14
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 ...
14
votes
3answers
809 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 ...
13
votes
3answers
665 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 ...
12
votes
3answers
592 views

Parametric Interpolation of 2D data

I want to create an interpolation through the following 2dim data points: ...
12
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. ...
11
votes
4answers
531 views

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
11
votes
2answers
171 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 ...
11
votes
1answer
1k views

Fitting a spline to data with FindFit?

I am trying to find a function that fits my almost linear data. A high order polynomial model has too much residual. So I was hoping to use Mathematica to fit splines to the curve. This is what I ...
10
votes
2answers
4k 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 ...
10
votes
2answers
583 views

How to add an interpolating point to InterpolatingFunction?

Suppose I have an InterpolatingFunction object defined on $[\epsilon,1]$; let's call it f. What is the best way to construct a ...
10
votes
3answers
802 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: ...
10
votes
1answer
481 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 ...
9
votes
2answers
211 views

Partitioning a superset of coordinates into subsets that generate continuous curves

Consider the data set corresponding to recorded trajectories for a particle: ...
9
votes
2answers
596 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 ...
9
votes
1answer
368 views

Test if argument is inside domain of InterpolatingFunction

The documentation says In standard output format, only the domain element of an InterpolatingFunction object is printed explicitly. The remaining elements are indicated by <> But this is not the ...
9
votes
1answer
206 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
3answers
822 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 ...
8
votes
3answers
666 views

Approximately Fit Data Without FindFit

I have some noisy data, and I'd like to analyze the derivative of the function the data approximately matches. Interpolation is normally great, but doesn't work ...
8
votes
4answers
703 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 ...
8
votes
2answers
331 views

How to make use of an interpolating function outside of Mathematica? [duplicate]

I'm currently working on a project where I have to solve some partial differential equations. Initially, I made some approximations so that an analytic solution could be obtained, and my ...
8
votes
1answer
123 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 ...
7
votes
1answer
250 views

StreamPlot with interpolating functions

While working my way through the Wolfram Blog post on simulating fluid flow I started playing with StreamPlot because I preferred quick and ugly visualizations over ...
7
votes
2answers
457 views

Function Interpolation with Automatic / Algorithmic Values Mesh

I have an underlying function f(x,y,z) that is computationally intensive, but is smooth and continuous. I'm needing to find the function values along a line in xyz. Currently, I'm calculating f at ...
7
votes
0answers
393 views

Creating and using an explicit piecewise function in a convenient way

I have a set of data points that define a function in the form curvePts = {data1,data2,...} where ...
6
votes
1answer
403 views

How to use Interpolation to fill in missing data

I have a bit of data that looks like this: ...
6
votes
2answers
1k views

Finding y given x from an interpolating function

I would like to put a dot on the point of a curve that has a specific y value but I don't know the x value. A simple example of my code is ...
6
votes
1answer
354 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
6
votes
1answer
566 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 ...
6
votes
1answer
611 views

Smoothing/Averaging 2D Vector Fields

I have a list of 2D vectors defined by {{x,y},{u,v}} and would like to smooth or average the vectors. For example here are 2 vector fields, the second has noise ...
5
votes
3answers
234 views

Interpolation steeply drops to 0 beyond data

I use Interpolation on unstructured 3-D-Data to visualize different regions via RegionPlot. A problem I run into is that the interpolating function steeply drops to zero beyond my set of data. This is ...
5
votes
2answers
149 views

Function that is a good fit to the plot made with SmoothHistogram

How can I find a function that fits the plot from the SmoothHistogram function? For instance if I have data like this and plot a Smooth Histogram, how can I get a function that fits the plot? ...
5
votes
2answers
321 views

How can I force points in a list to have distinct x values?

I have a list of points that may be used for linear interpolation using Interpolation and need to ensure that no two points have the same $x$ value, since, if they ...
5
votes
2answers
151 views

How to get the boolean value of an inequality involving an InterpolatingFunction?

Here's the code: yan = FunctionInterpolation[x^2, {x, -1, 1}]; FullSimplify[yan[x] > -1, -1 < x < 1] Needless to say, what I expect to see in the output ...
5
votes
2answers
476 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 ...
5
votes
2answers
308 views

How to find Matano plane

I have discrete collection of data points (10 to 10^4). I want to describe them by a continuous function and find a x value z, ...
5
votes
3answers
331 views

Interpolation with boundary conditions

I'm working on a sales projection, trying to create some flexibility in handle the forecast using locators. The toy code is something like this: ...
5
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 ...