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

learn more… | top users | synonyms

2
votes
3answers
162 views

BSpline or other curve through arbitrary ordered sequence of two-dimensional points

How does one create a BSplineCurve or other smooth curve passing through each point in an ordered list, where the curve may be non-simple, i.e., can double-back ...
22
votes
4answers
823 views

Arbitrary precision spline interpolation

The current implementation of Interpolation does not allow arbitrary precision spline interpolation. Yu-Sung Chang says here that "it is not hard to implement it ...
1
vote
2answers
691 views

How does ListPlot3D interpolate data?

I have data of the form {{x1, y1, f(x1, y1}, {x2, y2, f(x2, y2)}, ...}. I need to interpolate the data to get an interpolated ...
2
votes
3answers
97 views

Extract function from a parametric interpolating function

I've read the answers of How to make use of an interpolating function outside of Mathematica?, Interpreting the interpolating function and saving data to plot with external program, Extracting the ...
4
votes
1answer
90 views

How to get coordinate from spline interpolation

Hi, I would like to find 10 coordinates between each points of this spline interpolation. I have done some research, but cannot find an appropriate answer. Any help will be appreciated. ...
1
vote
0answers
84 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
1answer
81 views

Working with Interpolating Functions

I have two sets of data that are not regularly sampled, and I want to produce a quantitative measurement of how similar they are while fitting them with an $x$ shift and $x$ and $y$ scaling. ...
3
votes
1answer
91 views

Repeated interpolation for 3D unstructured grid -> Optimization

Trying to perform mesh-to-mesh 3D interpolation on unstructured grid. Mesh size is about 200k nodes. Painful thing that interpolation shoud be repeated ~1000 times (different thermal map) on the same ...
4
votes
1answer
87 views

How to get `FindCurvePath` to return only one list

As you can see below, FindCurvePath returns only a part of the list, resulting in a partial interpolation. I would like to interpolate all the points. Complete ...
3
votes
0answers
66 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 ...
6
votes
1answer
88 views

How do I reverse the X-axis on a ListDensityPlot?

I want to use ListDensityPlot on a dataset containing a few (~600) triplets and I would like to reverse one of the axes. Sadly, the workaround involving the ...
7
votes
3answers
245 views

Linear interpolation of elements in a list to generate new list

For a list of any given length, I want to generate another list from it adding elements which are mean of the consecutive elements, in between the elements, of the original list. For example: ...
2
votes
2answers
122 views

How to store an InterpolatingFunction? [duplicate]

Assume I have obtained an InterpolatingFunction, say, as the result of solving of a differential equation, say, this one: ...
3
votes
1answer
76 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 ...
1
vote
0answers
55 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. ...
0
votes
0answers
56 views

NIntegrate on Interpolated function has evaluated to non-numerical value

I want to define a function that interpolates and integrates input data. Because I want to use Findminimum on the function I need to tell Mathematica, the function is only to be evaluated at Real ...
3
votes
1answer
91 views

Interpolation of ListContourPlot3D, Volumetric data (cube file)

I know there are lots of information about this on stack exchange! Data interpolation and ListContourPlot InterpolationOrder for ContourPlot Unfortunately I was not able to find a proper way to ...
5
votes
2answers
129 views

FunctionInterpolation and Which combine badly

Update 2: Got two solid answers, but had trouble implementing one, and found the other could only save me computation time by sacrificing accuracy. So I chose neither as an official answer, but ...
3
votes
3answers
123 views

Combination of interpolations doesn't work?

I have tables of function values f[i_] and g[i_] and I need to plot various combinations of the function and its derivatives ...
6
votes
1answer
144 views

How to avoid creating negative values when using Interpolation?

I'm having some problems with Interpolation. I'm trying to interpolating some measurements data into mathematica. But using Interpolation will create some negative data, which is actually not possible ...
0
votes
0answers
115 views

Linear interpolation over 2 variables [duplicate]

I'm tuning a function to data over 4-5 variables using Differential Evolution. The objective function calls frequently interpolation function. I came to a point, where compiling the objective function ...
2
votes
0answers
111 views

Interpolation of Singular Functions

I am trying to interpolate discontinuous functions for R in interval $[0,100]$ and r in interval $[0,100]$: ...
3
votes
1answer
67 views

Table generation with SetDelayed function [closed]

I would like to understand why the following two outputs differ: Let us define the following data set: ...
1
vote
1answer
69 views

How do I restrict the range of an interpolating function in NDSolve?

I have a numerical solution for a differential equation. I know that the gray dotted solution is unphysical. Is there a way I can tell mathematica to ignore the gray dotted solution (e.g. restrict the ...
7
votes
2answers
269 views

How can I speed up my compiled RBF interpolating function?

Overview I have a function that acts like the Interpolation on sparse $n$-dimensional data using a simple implementation of RBF interpolation method. I want my ...
1
vote
1answer
58 views

Can list interpolation be made listable? [closed]

I have 8 sets of 2D-data that I want to each interpolate with ListInterpolate, because it is a very efficient command. The complete data are therefore in a 3D ...
1
vote
3answers
126 views

Many NSolves to interpolating function

I have an expression of the form: expr = TerribleNumericalFunction[U[p]] == SimpleFunction[p] The Simple function is a ...
2
votes
2answers
304 views

Interpolation showing noise in “non-noisy” data set

Stuck trying to get the interpolating function to match the (what I thought was a) smooth point set, how best to deal with this? Many thanks. ...
4
votes
2answers
261 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 ...
5
votes
1answer
94 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 ...
6
votes
1answer
193 views

Smoothen the curve found by EdgeDetect

It seems that curves found by EdgeDetect always persist $C^{0}$ continuity only. Consider the following example: ...
15
votes
1answer
442 views

Why does LogLinearPlot sample its argument outside the specified domain?

Bug introduced in 6.0 and fixed in 9.0.0 I experience a weird bug in the function LogLinearPlot. If the input is an interpolation function, such as the one ...
9
votes
1answer
148 views

Kernel Crash while using “ValuesOnGrid” method of InterpolatingFunction

Bug introduced in 10.0.0 and fixed in 10.2.0 I was experiencing some kernel crash while using "ValuesOnGrid" method of an ...
6
votes
2answers
190 views

What's the difference between Interpolation[pts, Method -> Spline] and BSplineCurve?

Last month, I answered a question about spline interpolation,please see here Now I do the following operations ...
12
votes
2answers
490 views

Interpolation on a regular square grid spanning a triangular domain

Bug introduced in 10.0 and fixed in 10.1 Context I am trying to identify contours of a function which is sampled on a cartesian grid within an irregular (triangular) region. Here is the data ...
1
vote
1answer
77 views

Interpolating a function of many variables

I am trying to interpolate a function of $5$ variables $$f[m,M,k,v,w]$$ by creating a 5D table of $n$ values in each dimension. ...
12
votes
4answers
511 views

Quirk in VertexColors interpolation when displaying Polygon

When using VertexColors, the docs state: The interior of the polygon is colored by interpolating between the colors specified by ...
3
votes
3answers
3k 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 ...
2
votes
1answer
181 views

Interpolation of a NURBS curve

Known that NQ=P where N is the Bspline basis function, Q is the control point that we wish to locate, P is the data points given ( the curve must pass through it) is there any way to modify the "N" ...
0
votes
0answers
17 views

Question regarding derivation of Interpolation functions [duplicate]

I am new to Mathematica. Can someone explain what is the difference between the second and third input (54 and 59) in following example (got from Mathematica site). In[52]:= ysol = ...
18
votes
1answer
464 views

How to fix broken InterpolatingFunction?

Fixed in Version 9 I have an InterpolatingFunction based on irregularly-gridded data, like this: ...
5
votes
2answers
306 views

Solve for x given an interpolation function, y

Given a list of data, lst={{x1,y2},{x2,y2},...,{xn,yn}} and the interpolation function fun, y=Interpolation[lst] which ...
16
votes
1answer
294 views

How can I smooth a 3D surface generated by RegionBoundary?

I have a set of points that belong to the surface of an object. I would like to approximate a surface to which I can compute the distance. of other points. With the nice code of this post, I was able ...
-1
votes
1answer
130 views

Multidimensional Interpolation with 3 independent Variables with modfied data set [duplicate]

I have four column data with first 3 column denoting x,y,z and fourth column energy. x variable is actually angle. Now I want to interpolate over all three indepdent variable (x,y.z) with ...
21
votes
6answers
5k 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. ...
23
votes
4answers
837 views

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
2
votes
3answers
78 views

InterpolationOrder 2 or more in ListLogLinearPlot

I'm using the function ListLogLinearPlot, but the plot is to square, i would like to have InterpolationOrder 2, but there is not ...