Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
4
votes
5answers
661 views

Interpolation gone awry?

Here's a simple example of an interpolation function that seems to me to have gone awry. Maybe someone would be so kind as to tell my what's going on with this? ...
4
votes
4answers
405 views

How to easily find the coefficients of a cubic polynomial and its plot for the given 4 points

Given 4 points as points = {{0, 4}, {1, 0}, {2, -1}, {3, 0}};. I want to find the coefficients of ...
4
votes
2answers
813 views

Mathematica Interpolation or approximation

I have lists of points X and Y. {1212,1216,1217,1219...}, {1,2,3,4,5,6...} I combine ...
4
votes
4answers
352 views

Continuous non-piecewise equivalent of smoothstep function?

I have a smooth step function given by the piecewise function ...
4
votes
2answers
1k views

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

In Mathematica 10 the following command ...
4
votes
3answers
128 views

questions about InterpolationOrder

I have a function $C_0(x)=e^{-(x-2.5)^2/2.0}$ which is differentiable to infinite order. I want to approximate the function with Interpolation such that it is smooth until 10th derivative. Here is ...
4
votes
2answers
137 views

Trying to build a function to compute divided difference for arbitrary list of points

As the title says Im trying to build a function to compute divided difference for arbitrary list of points. The divided difference of a set of points $\{(x_1,y_1),\ldots, (x_n,y_n)\}$ where $x_j<...
4
votes
3answers
502 views

Error when compiling function containing InterpolationFunction [duplicate]

I'm trying to solve a coupled ODE system using NDSolve. The coupling can turn on and off in some regions, and when the coupling is off, the solution can be written ...
4
votes
2answers
2k views

Area or NIntegrate curves defined by points?

Is there a convenient method to compute the AUC (Area Under the Curve) metric that quantifies a Receiver Operating Characteristic (ROC) like shown here? The data used to build the ROC are just pairs ...
4
votes
1answer
227 views

How does this Mathematica code work?

I am trying to work with a simulation of Brain Tumor growth and I was fortunate to get a very great example at http://community.wolfram.com/. However, I need clarifications on some of the code. I ...
4
votes
1answer
176 views

Custom interpolation algorithm

Suppose I have a list to create a list density plot, the list format is: list = {{0.5, 0.5, 0.0}, {-0.5, 0.5, 1.0}, {1.0, -0.45, 0.0}, {0.0, 0.0, 0.0}} The size ...
4
votes
3answers
266 views

Variable partitioning of the data in the form of “list of lists”

I am looking for a way for variable partitioning of the data in the form of a "list of lists" for interpolating the imported data from excel. The data looks like: ...
4
votes
2answers
1k views

Ways to plot interpolating functions more economically?

I am interpolating a lot of data over geographic coordinates obtained via GPS, and frequently I need to plot these interpolated functions together. For example, I may have an interpolated elevation ...
4
votes
2answers
468 views

How to get value from InterpolatingFunction

I have numerically solved a system of ODEs using NDSolve. I can plot them using ParametricPlot but I am having trouble evaluating them at specific points and ...
4
votes
2answers
668 views

Integrating an interpolating function

I have been using the following NDEigensystem command to generate the eigenfunctions of the laplacian with a square domain: ...
4
votes
2answers
1k views

How to take derivative of a interpolated function inside the module

When handling derivatives of a interpolated function, I often use the following function makeDeriv[f_InterpolatingFunction] = D[ f[x], x] Then, I can define ...
4
votes
2answers
118 views

Plotting perpendicular lines to a contour plot (electric field from equipotential curves)

I'm currently working on a experiment about Electric Fields and Equipotential Curves. The problem is that I want to plot (estimate) the curves of electric field using the fact that every one of these ...
4
votes
1answer
501 views

How to plot InterpolatingFunction across its domain

I'm using NDSolve to solve a system of coupled ODEs for a range of different parameters. For most points in the parameter space, the integration breaks down ...
4
votes
1answer
167 views

Saved InterpolatingFunction behaving badly

Bug introduced in 10 and persists through 12.0 or later I created this InterpolatingFunction, and NIntegrate gives an absurd ...
4
votes
1answer
539 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. ...
4
votes
1answer
2k views

Can I use the values of interpolating points from NDSolve's output? And How?‎

The output of NDSolve is a (list of)InterpolatingFunction(s). In standard output format the ‎elements of interpolation are not ...
4
votes
1answer
602 views

ListDensityPlot performance when scaling axes

I need to visualize 3D data having 200*200 data points. ListDensityPlot is a good candidate, but it seems to have strange performance issues. I created a small ...
4
votes
1answer
655 views

using interpolation functions in ParallelMap

Edit I am editing the question to give a simple workable example. It is at the bottom under the heading Example. The original question is now headed withe Background. Background I am trying to ...
4
votes
2answers
315 views

Stop ListContourPlot from interpolating beyond the data points

I am using listcontourplot to show my 3D data points but It is interpolating between faraway points and it is changing the outline of the shape. this is what I want to see: and this is what I have: ...
4
votes
1answer
283 views

How to disable interpolation of ListPlot3D across points outside of the domain?

MWE Create and visualize the domain: ...
4
votes
1answer
630 views

Issue in ParallelTable after evaluating another function using NDSolve and FindRoot. What is wrong with this inverse?

I am trying to find the inverse of a function which is defined through NDSolve and NIntegrate. The question is pretty similar ...
4
votes
1answer
340 views

Interpolation function rejected by ParametricPlot3D

I was playing around with the bouncing ball example, and decided to make a 3d version. I decided to use ParametricPlot3D for a simple independent 3D presentation....
4
votes
2answers
327 views

2D grid as a 2D polygonal or smooth domain

I have a series of points, as a list of pairs of real numbers, each multiple of a base value. So they represent a subset of a grid. Given that this list, when represented with ...
4
votes
2answers
2k views

Implicit Interpolating function in Mathematica and its explicit form in small sections

I have a set of points $\{x_i,y_i\}$ that represents a closed curve. I want to find a function $F(x,y)$ such that $F(x,y) = 0$ gives the needed curve and $F(x,y) \ne 0$ outside the curve. For example,...
4
votes
1answer
143 views

How to interpolate between InterpolatingFunction objects

For some reasons I need to implement the method of lines instead of using the NDSolve function directly. As described in this tutorial, this is how the simplest PDE can be solved: ...
4
votes
1answer
165 views

Saving and loading lists of interpolating functions fast and cross-platform

Is there any way to save and load several lists of interpolating functions efficiently and cross-platform? I want to save the resulting interpolating functions of NDSolve which takes very long to ...
4
votes
1answer
312 views

Interpolation of data on a 4D grid

I have a 4D grid ...
4
votes
1answer
385 views

FunctionInterpolation Errors / Question re Evaluation Order and Options

I have using Mathematica functions that takes a Cartesian coordinate relative to the Earth (xyz) and converts it to a latitude, longitude, and altitude (lla). And here it is: ...
4
votes
1answer
475 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 ...
4
votes
1answer
363 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}}]] ...
4
votes
1answer
3k views

Can an Interpolation function be 'saved'? [duplicate]

Possible Duplicate: Save interpolated function I am importing tables with sizes of 100k - 500k rows and 4 columns. The larger the table, the slower my Mathematica runs for all computations after ...
4
votes
1answer
70 views

Extract a matrix from a ListInterpolation

I am looking to extract a large matrix from an InterpolatingFunction (roughly, 500x500x500), is there an easier way than extracting a Table ? I want a matrix of ...
4
votes
1answer
912 views

Interpolate on log scale

I have data in Mathematica that comes from y-log scale ...
4
votes
0answers
35 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 ...
4
votes
0answers
61 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
267 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
593 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
3answers
279 views

ListDensityPlot of a data set in polar coordinates

I have this data set composed of a table of {r,f[r]}. I want to make a density plot of the data. It should look like the picture. The data is not normalized like ...
3
votes
3answers
151 views

Interpolation[] gives negative values when all the initial data is positive

I have this data: ...
3
votes
4answers
1k views

Interpolating a plot with missing values

With data = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 5}, {8, 4}, {10, 3}, {10, 2}, {11, 1}} and ...
3
votes
3answers
543 views

NIntegrate not working after interpolation

I used linear interpolation between points: ...
3
votes
2answers
297 views

How do I find a function to fit these criteria?

I want to find a smooth continuous function f[x] that satisfies the following for real values of x: ...
3
votes
3answers
240 views

FunctionInterpolation over an open interval

I'm trying to obtain an arc-length parametrization of a spline curve as per https://mathematica.stackexchange.com/a/8456. To do so, I need to calculate partial derivatives of such curve and then ...
3
votes
3answers
639 views

Derivative of a 2D Interpolating function

I cannot find a way to obtain the partial derivatives of a 2D Interpolating Function obtained with ListInterpolation. I didn't find anything useful on the web. Any ...
3
votes
3answers
1k views

Failure in integrating from an interpolating function!

Consider a list like below: ...