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

learn more… | top users | synonyms

0
votes
1answer
49 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. ...
8
votes
0answers
97 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 ...
2
votes
2answers
131 views

Approximation of definite integral by parabolas

This question is related to Trapezoid approximation to definite integral. As promised, I am now asking about how to draw approximation of integrals by parabolas. I tried to modify MarcoB's code, and I ...
21
votes
4answers
695 views

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
0
votes
1answer
228 views

Transforming Sin into Abs[Sin] dynamically [on hold]

Is it possible to interpolate a polynomial that approximates Sin, and then be able to manipulate the polynomial or a sample of its points to make sections of the ...
4
votes
0answers
48 views

Multidimensional arbitrary precision spline interpolation on the grid

This question is a generalization of the previous one for multiple dimensions. In the answer to that question an implementation for the clamped spline interpolation for 1D case and arbitrary degree of ...
0
votes
2answers
288 views

Extract X value from corresponding Y value from a List or Transpose [duplicate]

I have a list of X values and Y values separately, and also together with: data=Transpose[{X,Y}] This data is from a chromatogram, and I want to extract the ...
9
votes
2answers
83 views
0
votes
2answers
70 views

Many NSolves to interpolating function

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

Interpolation on a regular square grid spanning a triangular domain

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 ...
2
votes
1answer
66 views

Calculate the partial vapor pressures of a variable at xB = 0.75 based on the interpolation functions of the data

I'm having troubles in solving an exercise for an assignment in my Chemistry course. Talking about interpolations, I've already have a graph but I need to calculate the partial vapor pressures of ...
9
votes
5answers
307 views

Function for a series of joined slopes

I need a function for a series of joined slopes and my solution feels a bit kludgy. Is there a better way? A list of pairs of transition points and slopes: ...
2
votes
0answers
71 views

Defining a region from combination of data and geometric region

I would like to define a region in (x,y) by combining the region RegionPlot[ ImplicitRegion[ Sqrt[x^2 + y^2] <= 0.99, {{x, 0.01, 0.99}, {y, 0.01, 0.99}}]] ...
5
votes
3answers
208 views

Derivative of contour in ContourPlot

Sorry to bring this question up again, since there are many similar questions on the site. I use to think this is a easy job to do, because for the worst case I can follow the answers on this site. ...
11
votes
3answers
456 views

Subtracting two plots from each other after shifting one

I have the following lists representing energy spectra that need to be subtracted from each other to produce a difference spectrum. ...
5
votes
0answers
65 views

Kernel Crash while using “ValuesOnGrid” method of InterpolatingFunction

I was experiencing some kernel crash while using "ValuesOnGrid" method of an InterpolatingFunction returned by ...
9
votes
2answers
354 views

Interpolating an Antiderivative

I'd like to be able to make InterpolatingFunctions for antiderivatives of functions that can't be integrated symbolically. However, the following code returns ...
0
votes
1answer
49 views

List manipulation performance or how to make independent list copy

I have a task to solve some system of equations with NSolve and print graph of it, depends on parameters. Something like this (maybe it is not a good example and does not always have a solution, but ...
3
votes
2answers
142 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, ...
0
votes
2answers
227 views

Interpolating a ParametricFunction

Original domain of my independent variable t is 0 to 10 nanometers, but in Mathematica (as in most numerical software), it's good idea to solve differential ...
0
votes
0answers
38 views

Extract x-values from InterpolatingFunction object? [duplicate]

Ok, So I have a numerical solution to a differential equation, and I am trying to get the data points out from it. So far, I have only been able to get the y-values with the following code: ...
-1
votes
1answer
52 views

Interpolation curve [closed]

I have a complicated parametric curve which takes too long to integrate, therefore I want to sample points and interpolate to speed up calculations. The curve is: ...
20
votes
4answers
504 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 ...
3
votes
3answers
286 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 ...
15
votes
3answers
940 views

Parametric Interpolation of 2D data

I want to create an interpolation through the following 2dim data points: ...
0
votes
0answers
78 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" ...
9
votes
2answers
174 views

Build an InterpolatingFunction with ElementMeshInterpolation

Suppose you have a function f[t_, x_, y_] := t (1 - x^2 - y^2) defined for {x,y} in ...
1
vote
0answers
143 views

How to write my own interpolation method

I was comparing results of spline interpolation in Mathematica and C++/gsl-library Results of interpolation are different if I use ...
-2
votes
1answer
93 views

Interpolate/extrapolate a gate charge curve from two different curves

Gate charge measured data. I have gate-charge measurement plots and Excel data for two operating points for a power MOSFET. Vds = 60 V, Id = 50 A Vds = 600 V, Id = 8 mA Can I generate a plot with ...
3
votes
2answers
117 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 ...
5
votes
1answer
111 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 ...
1
vote
0answers
37 views

Using Quantity[] units causes errors in my calculation

I have an interpolation function in which I wish to use actual units. If I perform the calculation normally, it works fine and returns a proper FittedModel. To illustrate my problem, consider the ...
0
votes
0answers
62 views

Polynomial interpolation using Neville's Algorithm

Is there an interpolating function in Mathematica which uses Neville's algorithm? I have written a C++ program to do interpolation using Neville's algorithm and I am getting a small difference ...
1
vote
2answers
59 views

How to generate commands which are very similar?

I have several data sets that I wish to interpolate and integrate like this: ...
8
votes
2answers
113 views

Changing the `ExtrapolationHandler` Function in Any Interpolation

This is a related question to What's inside InterpolatingFunction[{{1., 4.}}, <>]? and Suppress extrapolation of interpolating function in a ContourPlot. When interpolating a set of ...
5
votes
1answer
132 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 ...
4
votes
1answer
65 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 ...
20
votes
5answers
1k views

How to splice together several instances of InterpolatingFunction?

I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
1
vote
3answers
98 views

2D Interpolation of data file

I hae a datafile with 5 columns of the structure: x_i f(x_i,y_1) f(x_i,y_2) f(x_i,y_3) f(x_i,y_3) f(x_i,y_4) with i = 1 to about 100. Thus there are about ...
2
votes
0answers
47 views
2
votes
0answers
47 views
35
votes
1answer
768 views

What's inside InterpolatingFunction[{{1., 4.}}, <>]?

I'm curious what's inside the InterpolationFunction object? For example: ...
-1
votes
1answer
83 views

Using InterpolatingFunction in equations

I tried to use InterpolatingFunction in another ODE, but it doesn't work, because it seems for Mathematica that 2 functions are unknown instead of one. ...
0
votes
0answers
51 views

Improving RationalInterpolation Result

The following code produces a {4,4} rational interpolation approximation accurate to 10^-6 or better over the range ...
18
votes
3answers
1k views

Monotone, periodic 1d-interpolation with continuous 1st order derivative

Lately, we had this thread about interpolation where J. M. linked two interpolation methods. The background for my question is that I estimated a parameter in polar coordinates with dependence on the ...
2
votes
1answer
73 views

Interpolate a discrete vector field

I have a discrete vector field, from which I want to derive the continuous one. For example, the planar vector field is defined by: ...
0
votes
1answer
68 views

Interpolating a non-continuous set of points

I'm trying to create a pure function that I can feed into OutputResponse[ ] as the input u[t]. In order to do this, I've written code to create a square wave pulse train in the form of a collection of ...