# Questions tagged [interpolation]

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

739 questions
Filter by
Sorted by
Tagged with
1k views

### InverseFunction on an Interpolating Function is misbehaving

I am getting strange behavior when I try to calculate the inverse of an interpolating function for two similar data sets. My data sets are: ...
325 views

### How to derive/interpolate a polynomial f(x,y) from several discrete polynomials f(x)?

I have 7 discrete degree 3 polynomials $f_i(x)$. Each of them represents a snapshot of data from an experiment and fits this data quite well. This graph depicts the 5 largest of the 7 polynomials: ...
162 views

### Multi-variable FunctionInterpolation with the range of one variable as a function of another

How can I modify my FunctionInterpolation code so that the boundary of one of the variables is a function of another variable? ...
217 views

### Finding minimum fly-by radius between Mars and spacecraft from interpolating function

I've written an interplanetary trajectory solver/plotter that plots the path taken by a spacecraft on an Earth-Mars mission, but have run into a little trouble when the spacecraft actually reaches ...
1k views

### Interpolate throughout a 3d data list without extrapolation

I have a 3D list of data for which I'd like to plot an interpolated surface. There are several ways to achieve this, but none I cannot find a method which ONLY plots the ENTIRE interpolated surface ...
1k views

### Finding intersections of two parametric curves

I am dealing with the root finding of two parametric data curves (data below). I have already checked Parametric Interpolation of 2D data, which I found useful for plotting, though it is not adequate ...
163 views

### Constructing a list

I need to use the interpolation function on some data so I can integrate it. I have an array with 1400 subsets and there are 1400 elements in each subset: ...
222 views

### Obtaining points with equal spacing from interpolated data

Beginning with five ordered pairs I made an interpolation, obtaining an a polynomial expression. I got several other points with equal spacing from the polynomial expression. Are there any commands ...
2k views

### How to (correctly) interpolate an array of points?

I'm trying to obtain an interpolation function for points of an x^(-5) function (which goes to infinity at x = 0). ...
976 views

### Interpolation of unevenly spaced data, is it possible?

I need to interpolate data, that consists of many points in the beginning and a few in the end of the interval, like in the following example: ...
6k 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 ...
1k views

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

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

### Derivative of an interpolated function

I am trying to take the derivative of an interpolated function. I am given the function values and the derivatives at some irregular points. Here is my minimal working example to reproduce the error: ...
244 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 ...
6k views

### Retrieve values of InterpolatingFunction

While analyzing a large system of ODE's, I defined a particular ratio p, which contains some variables that are represented by ...
142 views

### Reshape interpolated data

I want to reshape/smooth the following data: ...
271 views

### Smooth initial data

I need something that produce pseudorandom smooth initial data for modelling phase separation equations (Cahn-Hilliard and simular). Generator code for now: ...
3k views

### Interpolation: Unstructured grid error

If I try to make a table SimpleTable and to interpolate a function of two variables, I encounter a problem. For example: ...
106 views

### Basic 3D Interpolation Failing

I've seen a few other posts asking about the "unstructured grid" error in Interpolation. Here's a minimal (non)working example of the issue: ...
309 views

### How to complete function which is not defined for all interval

I have a function testF22 like this ...
339 views

### Plot 1D slice of 2D InterpolatingFunction

I'm numerically solving a PDE (time+1D space) with NDSolve and want to plot some spatial profiles. Plot works, but is very slow ...
331 views

### interpolating a smooth closed surface to a non-uniform data set (ListSurfacePlot3D)

I want to generate a smooth coloured surface from a discrete set of points of the form {x,y,z,F} using the ListSurfacePlot3D. My data set is quite non uniform; the ...
196 views

### What is the Chebyshev method for InterpolationFunction?

With InterpolationOrder -> All, some methods of NDSolve returns interpolations with ...
2k 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 ...
59 views

### Weirdness with Interpolation of data and InverseFunction

Bug introduced in 8 or earlier and persisting through 12.0 Something strange is happening with this list of data: ...
239 views

### How can I fit a function onto a histogram?

SampleData = RandomVariate[RayleighDistribution, 5000]; Histogram[SampleData] This creates a histogram that (in my case) looks something like this: I want to ...
282 views

### Extract one dimension from an n-dimensional InterpolatingFunction

How can I extract a single dimension from an InterpolatingFunction? As an example: ...
373 views

### Strange extrapolation in ListContourPlot?

I have some Table of {x,y,z} values (energy as a function of radial and azimuthal frequencies in a galaxy if you care to know): ...
484 views

### How to evaluate differential entropy from raw data?

I want to evaluate the differential entropy according to here $$h(X) = - \int f(x) \log{f(x)} dx$$ where $f$ is the probability density function. Lets create some test data (normal distribution): <...
790 views

### Smooth 3D plot with colour of scattered data

I have a set of scattered 3D points with coordinate (x,y,z) and an intensity associated with it. I would like to do a smooth surface with the intensity being represented by the colour. My points ...
401 views

### NMinimize Constraints on Interpolating Functions

I have the following piece of code and am trying to use NMinimize (the last line in the following chunk of code) to minimize ...
739 views

### Intersection of a ListPlot3D surface with a plane

I'm trying to use Mathematica to analyze some physics data from an experiment, more precisely, I have to fit a 2D data series with a one dimension function. At the moment I'm able to load and plot ...
2k views

### Integrating a functional of an InterpolatingFunction

It is straightforward to Integrate an InterpolatingFunction. However, even for a simple functional of an ...
893 views

### Hermite interpolation

The well known Hermite interpolation uses piecewise cubic polynomials and fits the knot values and derivatives. In contrast the Mathematica piecewise Interpolation ...
2k views

### Interpolation won't give smooth output

I have a data, for example ...
461 views

### How does ListInterpolation work?

ListInterpolation takes an array of data and interpolates between the entries. Let us interpolate between the elements of the identity matrix. For reference, this ...
120 views

### FunctionInterpolation produces many error messages when given high-precision input [duplicate]

Both FunctionInterpolation[1, {x, 0,1.00000000000000004}] and FunctionInterpolation[1.00000000000000004, {x, 0, 1}]; ...
315 views

### Overriding default ExtrapolationHandler

When modeling systems with WhenEvent and NDSolve I found that the default extrapolation settings used in the returned ...
170 views

### Second derivative of SmoothKernelDistribution PDF?

Does anyone know why I can't seem to get a second derivative of this interpolating function f? In this example, h[x] is zero ...
78 views

### Eigenvalues and numerical eigenfunctions for similar differential operators

I am looking to numerically approximate the eigenvalues and eigenfunctions for a differential operator I am working with, assuming $\pi$ periodic boundary conditions. Namely, I define the function \$...
296 views

### How to use BSplineFunction for calculating derivative

I have a set of data like the following data = {{x1,y1},{x2,y2},{x3,y3},......} Now I use ...
371 views

### Finding the attractors of the vector field constructed as the gradient of an interpolated 3D scalar field

I have a list of data existing as {{{x, y, z}, f},...} from which I construct a 3D interpolation function using Interpolation[ ]. I am able to construct a vector field from the gradient of this scalar ...
136 views

### Analyzing MethodOfLines

In this example the wave equation ...
272 views

### Derivative of an interpolated function on an unstructured grid

I'm writing my own FEM Poisson equation solver in C++ and I'm using Mathematica as a benchmark - currently it seems that my program outputs a correct solution, however I want to check whether the ...
199 views

### Delete duplicates in list of interpolating functions

I have a list of several hundreds of InterpolatingFunction generated by numerical continuations based on different starting points. A list can be downloaded here [...
332 views

### Create ParametricFunction object without ParametricNDSolve

Documentation of v9 states that ParametricFunction is generated by ParametricNDSolve and ...
68 views

### Evaluation of Mod of InterpolatingFunction prevents discontinuity processing by Plot

While trying out @MichaelSeifert's answer to Eliminating Discontinuities When Using Mod with NDSolve and Plot for Oscillators, I came across this odd behavior. Depending on how an ...
89 views

### Why do some uses of PropertyList crash the kernel?

Bug introduced in 10.1.0 or earlier and persisting through 12.0.0 or later A support case with the identification [CASE:4222617] was created. While looking at the question How to evaluate the "...