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

learn more… | top users | synonyms

5
votes
1answer
292 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
56 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 ...
1
vote
2answers
60 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
3answers
201 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 an approximation of integrals by parabolas. I tried to modify MarcoB's code, ...
9
votes
2answers
317 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 ...
5
votes
1answer
106 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
236 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
136 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: ...
1
vote
3answers
133 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
66 views

Update NumericalFunction in NDSolve

I have NDSolve` StateData from an NDSolve` ...
9
votes
2answers
271 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 points,...
2
votes
1answer
73 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
583 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 <...
2
votes
1answer
248 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
134 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
81 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
262 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
171 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] ...
2
votes
1answer
210 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
572 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
110 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
108 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 "...
2
votes
1answer
242 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
1answer
124 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
97 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
181 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
132 views

calculate missing values, Interpolation

I've following data: ...
10
votes
5answers
334 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
143 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
199 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
75 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 ...
10
votes
2answers
700 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 ...
-3
votes
2answers
226 views

Aitken interpolation of a polynomial?

How I can approximate a polynomial using Aitken's scheme using two nodes for the interpolation? ...
4
votes
3answers
350 views

Transform an InterpolatingFunction

I'd like to transform an InterpolatingFunction from NDSolve but can't figure out how. Here's an example. The equation I want to solve is ...
2
votes
1answer
161 views

How do I find out what a Mathematica function is doing (which numerical method it uses and how)?

Long story short, I am working on a project which entails fixing a bug I have found in Mathematica (8 and 10). In general, I would like to know what a specific Mathematica function is actually doing ...
2
votes
1answer
251 views

Smooth animation of ListLinePlot

I have a sequence of 2D-points from uniformly sampling a time dependent process and plot this sequence with ListLinePlot. For example: ...
1
vote
0answers
70 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
1answer
118 views

how to make interpolated data as a function?

For example, data1 = 0 1 1 2 3 3 5 2 6 2 9 4 11 5 13 6 14 7 16 8 data2 = 0 2 1 3 2 2 3 1 4 2 6 3 8 4 9 6 11 4 16 7 each data have different x-axis interval. so ...
3
votes
1answer
214 views

List interpolation

Hi mathematica people! So i am looking for the best way to interpolate a function given a list of its values. I have an iterative algorithm which needs high precision otherwise the numerical noise is ...
1
vote
1answer
95 views

Interpolating a polynomial for with first and second derivative of points

I am trying to fit a polynomial for switch cutoff which is used in Molecular dynamics. I want a fifth order polynomial with six coefficient $c_0, ...,c_6$ between $r_1<r<r_2$ with these ...
2
votes
1answer
361 views

What extrapolation method does Interpolation use by default? [closed]

As far as I can tell, Interpolation uses cubic spline interpolation by default - please correct me if I'm wrong. What does it use for extrapolation outside of the ...
1
vote
3answers
610 views

Developing a function of two variables from given data

Cross listed from MSE: http://math.stackexchange.com/questions/1029399/developing-a-function-of-two-variables-from-given-data (I believe Mathematica SE is an appropriate place to ask this, as well.) ...
0
votes
0answers
51 views

How does Mathematica interpolates? [duplicate]

In manual for Interpolate function it is said, that possible method of interpolation is Hermite. Unfortunately, I can't see ...
0
votes
0answers
244 views

plotting the stable and unstable manifolds of a difference equation

I have a 2D non-linear system of difference equations for variables x and y defined as follows: ...
3
votes
2answers
402 views

Interpolation function error: Interpolation::femimq and Interpolation::fememtlq

In Mathematica 10 the following command ...
4
votes
1answer
219 views

How to evaluate differential entropy from raw data?

I want to evaluate the differential entropy according to here $$h(X) = - \int f(x) \log{f(x)} dx$$ where $f$ is the probability density function. Lets create some test data (normal distribution): <...
3
votes
1answer
215 views

Hermite method in Mathematica

When I solve the example below, in the results it is mentioned that Mathematica 10 has used the Hermite method. I cannot find anything about this in the Mathematica documentation. Is there nothing ...
2
votes
2answers
180 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 ...
3
votes
3answers
125 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 (...
2
votes
0answers
135 views

Interpolation of Singular Functions

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