# Questions tagged [interpolation]

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

1,008 questions
Filter by
Sorted by
Tagged with
1 vote
73 views

### Finding the maximum amplitide quantitatively using interpolation

I have the following table data = Table[Sin[i], {i, 0, 10, 0.1}] // N And I plotted the data as follows, Now I want to know the value of each maximum with high ...
38 views

### Interpolation function for data with repeating independent variable

I want to find an interpolation function for data in which the x-variable is repeated (example below). The repetition in data is natural and cannot not be eliminated. Can I somehow use ...
41 views

...
109 views

### Artifacts when interpolating on an unstructured set of 3D data

When doing an interpolation on an unstructured set of points it is best to use the interpolation method available from the finite element package. However, it is essential that some re-scaling is done ...
295 views

### Volume of Region Contained by 3D Data Points

I have a dataset consisting of (x,y,z) data that describe a surface, and I need to find the volume of the region bounded by that surface. The data do not follow any mathematical equation, but the ...
98 views

### Fractional derivatives (FractionalD) of an InterpolatingFunction to retun another InterpolatingFunction

Question I want to calculate the FractionalD of an InterpolatingFunction object, however, evaluating ...
130 views

...
64 views

### Interpolation error to generate a two variable function

I am facing some issues with performing an interpolation. From the image, you can find the values in three columns, the 1st column is x, the second column is ...
36 views

### Volume of revolution with InterpolatingFunction

I have an $(x,y)$ dataset read in from a file. The data do not follow any sort of equation, but have the general shape of $y=x^2$. The data below are a placeholder ...
22 views

### Problem with Piecewise function applying to matrix of polynomials

I have a matrix of a polynomial - function f f[t_, i_] := wielomianSpline[t, tx[[i]], wspfi[[i]]]; and I want to evaluate the ...
92 views

### FindPeaks in a 2d list and half values

FindPeaks is a nice little help. But it only works on 1D lists and tends to return half integer values for positions of the peaks which are ultimately very useless ...
246 views

### Find the zero crossing in data [duplicate]

I have the following list. l = Table[Sin[i], {i, -4 Pi, 4 Pi}] // N which gives me the following data, ...
75 views

### Does FunctionRange work with Interpolation?

$int = Interpolation[{{0, 0}, {1, 1}, {2, 2}}, InterpolationOrder -> 1] FunctionRange[{$int[x], x > 0.5}, x, y] returns ...
1 vote
60 views

### Interpolation of date-time data to fill in missing data for data sources with different time resolution

I have 2 data sources with different data acquisition rates. My first data source is a temperature measurement over time with a resolution of 1 s. My second source ...
419 views

### InterpolationOrder creates a sharp valley even if I increase the number of points. How to have a smooth curve?

I have a set of data as the following ...
1 vote
133 views

### How can I interpolate a piecewise constant function?

Let the given set of points ...
1 vote
80 views

### How to correctly extrapolate function?

There is a function: ...
40 views

### RegionPlot from discrete data

I have a discrete set of plots in the form (x,y,v) similar to (this is sample data, the actual data contains 13000+ plots which can be downloaded from here ...
1 vote
109 views

### Interpolation with nearly duplicate points

I have data sets with very close values and I am getting the error that points are being duplicated. Here is a small part of one data set. ...
282 views

### How to speedup the integration of a tabulated function?

The problem Consider some pre-generated list with coordinates x1,x2,x3,x4 and values of some function ...
80 views

### Speed up Interpolation

I have to calculate a lot of values using interpolation function. I think it could be faster, but I wasn't able to speed it up any way using Compile/Parallel computations. Am I missing something? <...
1 vote
68 views

### Finding Max/Min of interpolated function and average value above/below the x axis

I have the below code used to create an interpolation function that will plot the difference between two interpolated functions (to compare between different periods of time). However, I would like to ...
1 vote
47 views

### Kernel crash during Interpolation

I have a kinda large code of a solver, and after somewhat random amount of iterations it causes Kernel to shutdown with a "pop" sound and no messages. I tracked the exact line that caused it,...
57 views

### Why these two ways of interpolations give different results?

Consider a data file distr.dat. It is a tabulated grid in the form x1,x2, func[x1,x2]. I interpolate it in two different ways: ...
1 vote
107 views

### Plotting Polar Solution of NDSolve

I want to plot a solution to the Geodesic equations for the Poincare disk in polar coordinates (though these may be wrong. I want to plot these as a way to check my answer): \ddot{r}+\frac{2r}{1-r^2}...
456 views

### How to produce the following table faster?

Question Consider a toy function func[x1,x2,x3,x4] and a toy grid gridTot of the coordinates ...
1 vote
73 views

### How to speedup integration of interpolated function with logarithmized data?

Consider some dataset corresponding to the grid x1, x2, function[x1,x2]: ...
1 vote
66 views

### How to speedup calling the interpolation function? [duplicate]

Consider the following data: ...
40 views

### Conversion of an expression to function yields Tag Plus in ... is Protected error

I'm trying to implement polynomial interpolation. My current implementation involves generating an expression that is the final equation that will be plotted. While plotting the function itself works ...
1 vote
69 views

### Interpolation with replacing start and end values;

I have a list of data, data={1.61,37.23,61.83,73.14,79.36,83.88,94.06,96.60,97.73,98.86,99.43,100}; aa=ListPlot[data] which looks like the following, is there ...
112 views

### Combining two interpolating functions via Piecewise or If is very slow

For a given set of parameters $(i,l,m)$ I have a function which has been evaluated on a grid $x \in (-2,2)$. Since this function is not smooth (only continuous) at the "interface" $x=0$, I ...
1 vote
87 views

### How to plot a curve with an experimental plot [closed]

There is an experimental curve in this paper : https://arxiv.org/pdf/1211.2616.pdf ( Fig. 21. ) I want to make a new plot of the experimental curve with my theoretical model curve. How to do so by ...
211 views

### NIntegrate a discrete data set with uncertainties

Consider a data set with some numerical uncertainty in the y-values, such as the following ...
34 views

### ListContourPlot InterpolationOrder surprise

ListContourPlot interpolation does not use the adjacent four points as I would have expected but only two of the four points surrounding the contour. You can see ...
1 vote
37 views

### RegionFunction doesn't work with an InterpolatingFunction when using ListContourPlot

I have a contour plot which I make using ListContourPlot from discrete data, which looks like this. The data live on grid points that are shown in light blue, and ...
42 views

### ListInterpolation start from zero index: [closed]

we have a Listinterpolation: f = ListInterpolation[{1, 2, 3, 5, 8, 5}] that gives f[2.5] 2.4375 so, ListInterpolation starts ...
302 views

### How can I replace the locally defined function inside If with its value?

Consider the following module: ...
35 views

...
124 views

### ListInterpolation and extrapolation: order has been reduced, [closed]

I have a following ListPlot and ListInterpolation, ...
1 vote
98 views

### Define a function on a MeshRegion

This looks like a simple question with the answer to be easily found, but unfortunately I could not find it either on the web or in the documentation browser. Let us assume we have a MeshRegion ...
1 vote
77 views

### Interpolate array (x,y,z,V)

I would like to interpolate a numeric matrix that corresponds to a scalar field in a 3D geometry. Each row contains four elements {x,y,z,V}. I have tried to use ListInterpolation, but when I evaluate ...
45 views

### FindRoot over parametric interpolating function

Consider the already well answered topic : Get x and z coordinate from an image and make a parametric surface of revolution. ...
1 vote
145 views

### Accurate and efficient sampling of interpolated functions

Suppose we are given two interpolated functions ...
125 views

### Using interpolation function

I have data for the below figure and want to determine the values along the diagonal and plot a line graph with the x axis. ...
103 views

### NSolve fails with two-dimensional interpolation [closed]

I have an interpolating function that takes two arguments. I would like to solve for the case when both arguments are equal, and the interrelated value is some constant. I can plot the interpolating ...
166 views

### Returning an InterpolatingFunction

I am trying to write a function using Block that generates an InterpolatingFunction and then generates a second InterpolatingFunction that is a function of the first. I can return and use the first ...
1 vote
92 views

### Fitting an inverse power law [closed]

Is there any reasonably fast way of finding a function of the type that best fits a given data, for some K and n? For example, the following data closely follows an inverse power law ...
1 vote
50 views

### Interpolation in block: a problem [closed]

Consider the following data: data = Table[{x, 1, x, x^2, x^3, x^4}, {x, 0., 1, 0.01}]; I would like to interpolate the 1-d function f[x] made of ...
1 vote