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

learn more… | top users | synonyms

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 ...
9
votes
2answers
83 views

Finding self-intersections of a closed curve represented by an interpolation function

I've been trying to find particular simple closed curves on a plane. ...
3
votes
3answers
192 views
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}}]] ...
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 ...
0
votes
1answer
50 views

How can I change the behaviour of InterpolationOrder -> 0? [duplicate]

Consider the following example: ...
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. ...
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 ...
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. ...
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: ...
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 ...
-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: ...
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 ...
-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: ...
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 ...
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 ...
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 ...
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

Construct single InterpolatingFunction from a mathematical combination of other IF's

Let's say I have an interpolated function f, like I might get as the solution to an NDSolve: ...
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 ...
2
votes
0answers
47 views

Update NumericalFunction in NDSolve

I have NDSolve` StateData from an NDSolve` ...
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 ...
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 ...
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
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: ...
-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
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 ...
1
vote
1answer
87 views

how to reduce noise in time series data?how to do interpolation for missing value data?

i have done this coding to plot the data. the problem is some value is missing for certain date and the graph is not smooth and noisy. one way to smooth the data is by interpolation but i dont know ...
3
votes
2answers
107 views

Numerical root-finding: Find leftmost root in a domain

This is surely a duplicate, but I cannot seem to find a similar question. I use NDSolve to find an InterpolatingFunction y[t] ...
1
vote
1answer
160 views

Line integrals over a path defined by a set of points (rather than an analytic formula)

I'm getting inaccurate results when computing (plotting) the value of a function against the length of a line integral, where the path comes from a set of numerically calculated points. (In contrast, ...
2
votes
3answers
268 views

Function to calculate average of multiple lists

I have several lists of experimental data f[x] with different intervals Δx including some noise. ...
0
votes
1answer
62 views

Numerical integration of a three dimensional array

I need to integrate a scalar valued function $f\left(\boldsymbol{x}\right)$ where $\boldsymbol{x}$ is a three dimensional position vector; in other words: $\int_{\Omega} f\left(\boldsymbol{x}\right) ...
2
votes
1answer
101 views

Find tangency of InterpolatingFunction and circle

I am trying to use a system of equations to solve for the common tangent of a (polar) InterpolatingFunction and a circle. Unfortunately, both NSolve and FindRoot don't yield results, even when I ...
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" ...
3
votes
0answers
70 views

Strange extrapolation in ListContourPlot?

I have some Table of {x,y,z} values (energy as a function of radial and azimuthal frequencies in a galaxy if you care to know): ...
1
vote
1answer
60 views

Making a movie from an interpolating function

Say I use some Mathematica procedures to find an interpolating function of two variables: $u(x,t)$. Is it possible to make a movie of this interpolating function, i.e. plot it on a certain line $x \in ...
3
votes
2answers
98 views

FunctionInterpolation with vector output and scalar input

Apparently it is possible to build and InterpolatingFunction that accepts a vector input and returns a vector output: ...
1
vote
2answers
97 views

calculate missing values, Interpolation

I've following data: ...
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
96 views

Position from 3 dimensional acceleration data? [closed]

Per a previous post on Mathematica StackExchange here I'm trying to utilize 3-axis accelerometer data to determine approximate 3D position. I wanted to start with a simple case. To this end I've ...
2
votes
2answers
120 views

Derivative of Vectoral NDSolve Interpolated Function / Rule Solutions,/., and Vector NDSolve [duplicate]

I need to find the instantaneous phase and instantaneous frequency for a rotating system. I am having difficulty making the math work with interpolating functions. First, here is a problem without ...
0
votes
1answer
58 views

How to fit this data to be used in NIntegrate later?

I have a list of data points that resemble a chi-squared distribution (long tailed gaussian) that I am having trouble fitting or finding an equation with. The goal is to use the fitted equation in an ...
6
votes
2answers
342 views

ListContourPlot interpolation fails if x and y axes have different scales

To summarize what is below: ListContourPlot doesn't work when the domain has different x and y scales (fails when x/y~10^4, which seems surprisingly small). Is it possible to call ListContourPlot ...
1
vote
0answers
266 views

NDSolve: Equation with interpolating function [closed]

I have a question regarding DSolve and NDSolve functions in Mathematica 10. For instance, I'd like to solve an ODE: ...