Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
6
votes
1answer
270 views

What is the Chebyshev method for `InterpolationFunction`?

With InterpolationOrder -> All, some methods of NDSolve returns interpolations with ...
6
votes
1answer
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: ...
6
votes
1answer
217 views

Different results using spline interpolation in Wolfram and MATLAB

I use the same data for interpolation in Mathematica and MATLAB, but the result is different. ...
6
votes
2answers
211 views

Reduce the dimension of InterpolatingFunction

So I have been trying to extract 2D interpolating function(x,t) or (y,t) from 3D interpolating function(x,y,t) by replacing y=0 or x=0. My domain is triangular(see below). Ultimately, I want to ...
6
votes
1answer
697 views

ListPlot3D of a set of points in a non-convex region

I would like to plot a set of points in the same style as ListPlot3D does, but only in a non-convex region that I can specify (e.g. using a ...
6
votes
3answers
784 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: ...
6
votes
1answer
431 views

Interpolation of data

Consider a set of data points ...
6
votes
2answers
338 views

Extract one dimension from an n-dimensional InterpolatingFunction

How can I extract a single dimension from an InterpolatingFunction? As an example: ...
6
votes
1answer
2k views

White spots in ListDensityPlot

I have a problem with ListDensityPlot. I have some data on an irregular grid. I try to plot them with ...
6
votes
1answer
134 views

Efficiently fill sparse matrix involving BSpline

Context In order to implement regularised fitting in 2 or 3 dimensions (as is done say here) using BSplineBasis one needs to evaluate a basis over a set of data. ...
6
votes
1answer
879 views

How to plot InterpolatingFunction across its domain

I'm using NDSolve to solve a system of coupled ODEs for a range of different parameters. For most points in the parameter space, the integration breaks down ...
6
votes
1answer
907 views

Multiply interpolating function with variable

I am always running into trouble when trying to use interpolating functions. I am trying to do: ...
6
votes
1answer
588 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): <...
6
votes
3answers
457 views

Interpolation impossible for ListPlot with Missing?

I have a list of data to plot. I would like to plot them with lines but delete some data before plotting and leave the lines disconnected where data is deleted. For example, ...
6
votes
1answer
150 views

Recycling solutions of multidimensional NDSolve

Dear wolfram community, I hope my problem is clear and easy to solve. I have already solved the following heat equation over a domain: ...
6
votes
1answer
367 views

What is wrong with this code? (Usage of FunctionInterpolation and how to make code efficient)

I am trying to create an interpolation out of a function that comes from an improper integral. The end goal is to make a 3d plot over a specific region. Specifically, I have the following code: ...
6
votes
1answer
169 views

2D interpolation of function with dependent interpolation border

My problem is to compute $$\int\limits_{x_{min}}^{x_{max}}\int\limits_{y_{min}}^{\sqrt{x^{2}-a^{2}}}W(x,y)g(x)\ dx\ dy$$ Because $W$ have highly oscillatory 2d complex numeric integral inside, dumb ...
6
votes
1answer
300 views

FunctionInterpolation error when specifying AccuracyGoal

Bug introduced in 8 or earlier and persisting through 11.0.1 or later In the help page ref/message/FunctionInterpolation/ncvb, it is mentioned that one should ...
6
votes
1answer
302 views

Evaluating InterpolatingFunction returned by NDSolve is very slow starting from some arguments

I use this code to solve a PDE: ...
6
votes
1answer
383 views

Overriding default ExtrapolationHandler

When modeling systems with WhenEvent and NDSolve I found that the default extrapolation settings used in the returned ...
6
votes
1answer
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: ...
6
votes
2answers
362 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: ...
6
votes
1answer
196 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? ...
6
votes
1answer
409 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 ...
6
votes
1answer
229 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 ...
6
votes
0answers
197 views

Accuracy of Chebyshev Interpolation

I have been looking at how to interpolate a function using Chebyshev polynomials. There are several good posts such as this one by Michael E2 and this one by J. M. There is also an example in the help ...
6
votes
0answers
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 ...
5
votes
4answers
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 ...
5
votes
4answers
497 views

How to easily find the coefficients of a cubic polynomial and its plot for the given 4 points

Given 4 points as points = {{0, 4}, {1, 0}, {2, -1}, {3, 0}};. I want to find the coefficients of ...
5
votes
4answers
172 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: ...
5
votes
2answers
1k views

Mathematica Interpolation or approximation

I have lists of points X and Y. {1212,1216,1217,1219...}, {1,2,3,4,5,6...} I combine ...
5
votes
4answers
799 views

Continuous non-piecewise equivalent of smoothstep function?

I have a smooth step function given by the piecewise function ...
5
votes
3answers
346 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 ...
5
votes
3answers
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). ...
5
votes
4answers
1k 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: ...
5
votes
3answers
7k 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 ...
5
votes
3answers
1k 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 ...
5
votes
2answers
419 views

Trying to build a function to compute divided difference for arbitrary list of points

As the title says Im trying to build a function to compute divided difference for arbitrary list of points. The divided difference of a set of points $\{(x_1,y_1),\ldots, (x_n,y_n)\}$ where $x_j<...
5
votes
2answers
497 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: ...
5
votes
2answers
261 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
201 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: ...
5
votes
2answers
1k views

Ways to plot interpolating functions more economically?

I am interpolating a lot of data over geographic coordinates obtained via GPS, and frequently I need to plot these interpolated functions together. For example, I may have an interpolated elevation ...
5
votes
2answers
148 views

Reshape interpolated data

I want to reshape/smooth the following data: ...
5
votes
3answers
304 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: ...
5
votes
3answers
363 views

How to complete function which is not defined for all interval

I have a function testF22 like this ...
5
votes
1answer
421 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 ...
5
votes
2answers
417 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 ...
5
votes
2answers
808 views

Integrating an interpolating function

I have been using the following NDEigensystem command to generate the eigenfunctions of the laplacian with a square domain: ...
5
votes
1answer
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 ...
5
votes
1answer
80 views

Derivative of a 3D Interpolated function

I cannot get the partial derivative of a set of data. I managed to get the accurate interpolation, but I cannot evaluate its derivatives. Here are my details: ...

1 2 3
4
5
18