Questions tagged [interpolation]

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

90 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
13
votes
0answers
697 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 ...
7
votes
0answers
142 views

InterpolationOrder has no effect on ListContourPlot when the data is of the form {x,y,f[x,y]}

This is related to the issue brought up here, if you want to mark it as duplicate feel free to do so, but it is slightly separate. Take two sets of data, identical except for the form, ...
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
0answers
66 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 ...
5
votes
0answers
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 "...
5
votes
0answers
88 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 ...
4
votes
0answers
60 views

Plotting InterpolationFunction over Quantities

What's the proper syntax to plot Interpolation functions defined over Quantities? points = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}}; Change domain to ...
4
votes
0answers
266 views

N[Integrate] failing to return an accurate result from an interpolated integrand

I need to N[Integrate] a function Cos[alpha*x]*f(x) between x=0 and 30 at increasing alpha-values. Here f(x) is an interpolated function derived from a set of 120 ...
4
votes
0answers
592 views

Cubic polynomial interpolation with velocities listed rather than some points

I am trying to use the function BSplineFunction[] to create a natural cubic spline. Normally what is done is that you specify "SplineDegree -> 3" and include a list of points and it will carry out ...
3
votes
0answers
90 views

How do I truncate an interpolating function?

I have a very large interpolating function and want access the function at one point in time. I am running out of RAM running ...
3
votes
0answers
88 views

Parallel evaluation of RandomVariate for an InterpolatingFunction

I need to generate a lot of point according to a given distribution. I don't have an analytic form of this distribution so I am using an InterpolatingFunction of ~100 points computed numerically. I ...
3
votes
0answers
34 views

DumpSave and precision of interpolation data

Consider the following prec = 32; x = N[Range[0, 1, 1/10], prec]; f = Interpolation[Transpose@{x, y}]; Then ...
3
votes
0answers
188 views

Reducing a FEM 3D Interpolation Function to a 2D Interpolation Function

I'm trying to solve the heat equation in 3D using FEM and back out a slice in the xz plane. My problem is when I define a function that is a slice in the xz plane it uses the full 3D interpolation ...
3
votes
0answers
101 views

Why does the domain of an interpolating function not match the corresponding ParametricNDSolve solution range?

Question I had believed - and mostly observed - that when I use ParametricNDSolve the obtained ParametricFunctions given as the ...
3
votes
0answers
106 views

Interpolate a 3D surface in 3D

We have taken measurements on a cylindrical flexible item. At each of the measurement locations we have an oscillating motion which is described in terms of three orthogonal directions. The ...
3
votes
0answers
89 views

Data Interpolation of deaths by date

I am working with an ebola dataset from Guinea, 2014:(http://currents.plos.org/outbreaks/article/estimating-the-reproduction-number-of-zaire-ebolavirus-ebov-during-the-2014-outbreak-in-west-africa/). ...
3
votes
0answers
138 views

Diagonalisation of equations for NDSolve

I have a linear matrix differential equation and I wish to speed up evaluation by diagonalising using eigenvectors. There is an example in Help for finite elements under "swinging beam" that is ...
3
votes
0answers
111 views

Update NumericalFunction in NDSolve

I have NDSolve` StateData from an NDSolve` ...
3
votes
0answers
610 views

How to make 3D object smooth?

This thread considers mathematical methods here to make the 3D object smooth but this question consider how to achieve the goal of smoothing a 3D object in Mathematica. I want to get smoother ...
2
votes
0answers
149 views

Derivative of an interpolation function is noisy

I have a set of numerical data of 1501 points, in the form of $\{x_i,a_i\}$ which I uploaded to here and here. I need to compute the numerical derivative of this data. In particular, I need the ...
2
votes
0answers
90 views

A problem when interpolating the data

I have some data in a form data = {{x,y,f[x,y]},...}, where f[x,y] takes only positive values. When I try to interpolate it, <...
2
votes
0answers
126 views

Contour lines in ListContourPlot with InterpolationOrder 0

I have a dataset and would not want Mathematica to interpolate at all while plotting the contours. This is because the data contains essential binning information and the "steps" in the contour must ...
2
votes
0answers
55 views

How to get ImageTransformation to not compute the function at *every* pixel

I am using ImageTransformation with a slow function. Is there a way to get ImageTransformation to compute the function at only a ...
2
votes
0answers
396 views

Export to PDF: DensityPlot & AllowRasterization->False

How to get production-quality vector graphic exported from Mathematica that looks like what is plotted in Mathematica. Example code: ...
2
votes
0answers
74 views

Defining a function by coordinates of points and degree of a polynomial

I'm studying about solid of revolution. In these studies, I learned that to get the volume of such a solid, I need to know $f(x)$ to describe the contour of the profile. This concept I understood. $...
2
votes
0answers
66 views

Obtaining the interpolation function of a surface

Some sample data ...
2
votes
0answers
221 views

How to access the components of a vector-valued interpolating function

I have a problem in accessing the components of a vector-valued interpolating function. I have the following data: data = {{0, {1, 0}}, {1, {0, 1}}}; with a ...
2
votes
0answers
418 views

Interpolation error: element mesh with insufficient quality

I'm trying to work with a numerical function as a list of elements: {{x1, y1}, f1}, {x2, y2}, f2}, ..., {xN, yN}, fN}} I've produced the list in other ...
2
votes
0answers
297 views

Padé approximation of a complex function

I have an interesting problem for the Mathematica. I have some function, let's call it $G$. This is function of discrete set of equidistant points on imaginary axis, $i \omega_n$, so the typical data ...
2
votes
0answers
182 views

Derivation of an interpolation function with multiple arguments

I have the following interpolation function: f[x_,a_,b_]:=70 s[a,b][[1,1,2]][x] where s[a,b] is the solution of a ...
2
votes
0answers
351 views

Interpolation of Singular Functions

I am trying to interpolate discontinuous functions for R in interval $[0,100]$ and r in interval $[0,100]$: ...
2
votes
0answers
586 views

Slow integration of interpolating function

I have a large file with irregularly spaced data in the format: ...
2
votes
0answers
751 views

Change of coordinates for an InterpolatingFunction

This is a toy example of the question I have but I think it illustrates the point. I have a function y[x] which is an interpolating function. Let's define it ...
1
vote
0answers
49 views

Interpolation of multidimensional data: some domains are lost

I am trying to make a reasonable interpolation of a dataset having the form dataset = {{x1,x2,x3,f[x1,x2,x3]},...}. I to the interpolation in the following way: <...
1
vote
0answers
31 views

Extra interpolation in ListPointPlot3D

I'm trying to plot a 3D surface using ListPointPlot3D and it looks almost right, but for some reason it's trying to connect points that should not connect. I think it's confused because the surface is ...
1
vote
0answers
29 views

Plotting 3D points with function as contour

so I have a grid of points in 2D $(x_i, y_i)$, and a function $f(x_i,y_i)$. I plotted them together like this: -- Now I would like to do the same with a grid of 3D points $(x_i, y_i,z_i)$ and a ...
1
vote
0answers
226 views

Unable to Solve Area Using Paramteric Equations derived from The Numeric Soution of a Differential Equation

I'm creating a test that measures the distribution of closed shape $\mathcal{C}$. This requires taking the average ray length (from $(u,v)$ in $\mathcal{C}$ to the boundary) using ray length per ...
1
vote
0answers
67 views

Speeding up a minimisation involving Numeric integral and Interpolating function

I am doing a minimisation procedure to obtain best fit parameters a,b,NN for a model involving a numeric integral and an interpolation function. The code as written ...
1
vote
0answers
40 views

Interpolation with order All function object not given as output

I use mathematica10.4 and want to interpolate uneven data in 3 independent variable, (say r1, r2, r3). Because it is an unequally spaced data, I prefer interpolation order->All. But when I run the ...
1
vote
0answers
107 views

Understanding the structure of an InterpolatingFunction

FunctionInterpolation[x^2, {x, 0, 9}] // InputForm returns: ...
1
vote
0answers
88 views

Using FindMaximum on one component of a vector-valued function

I've got a physics simulation that uses NDSolve and returns a vector-valued InterpolationFunction, by which I mean that the <...
1
vote
0answers
430 views

Smoothing ListContourPlot contours for unstructured grids. Part 2

My question is motivated by the following discussion. Smoothing ListContourPlot contours I need to generate high-quality contour plots for some property generated on a non-rectangular grid. This is ...
1
vote
0answers
490 views

Obtaining values from interpolating functions

A similar question has been asked in the post HERE but the current question is more complicated: I have the following differential system ...
1
vote
0answers
298 views

How to use interpolating functions in NSolve with a piecewise function?

I have a system of two non-linear differential equations that are piecewise, the solutions of which I would like to use to obtain the values of a third variable that is also piecewise. I have trouble ...
1
vote
0answers
132 views

Absurd solution by LinearSolve

I am trying to find curve that passes through all the data points.To do this i am doing interpolation using LinearSolve. No. of equations vary from 1000 to 3000. LinearSolve gives me values of ...
1
vote
0answers
196 views

Determining the order of continuity (smoothness) of a function

Is there any method to determine the order of continuity of a function (just like an interpolant) over a given domain, or at least determine the continuity on a given order? For example, according to ...
1
vote
0answers
82 views

Continuous integration of a tensor function using discrete density values

Hei, I am wondering is it possible to implement continuous integration using Integrate() of a fourth order tensor with discrete density values. ...
1
vote
0answers
94 views

Improving RationalInterpolation Result

The following code produces a {4,4} rational interpolation approximation accurate to 10^-6 or better over the range ...
1
vote
0answers
81 views

Conjugate of InterpolatingFunction?

From NDSolve, I got this: {{a1 -> InterpolatingFunction[{{0., 40.}}, "<>"]}} What would be a sensible approach to ...
1
vote
0answers
816 views

Interpolating function as a model in Mathematica's procedures for fitting

Is it possible to use interpolating function with parameters as a model for NonLinearModelFit (and other integrated methods for fitting)? Similar question was ...