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

learn more… | top users | synonyms

2
votes
4answers
126 views

2D interpolation

Consider following series of functions Do[f[k][w_] = Exp[-(w-Sin[k])^2], {k, 10}] depicted as Let us tabulate and interpolate them ...
3
votes
1answer
81 views

NDSolve with an interpolating function in Piecewise

Again I have question I hope someone can answer. I made a very simple example illustrating my more difficult problem. I want to solve a differential equation numerically with a conditional in the ...
16
votes
2answers
2k views

Find maximum value of interpolation function - obviously wrong result

Minimizing and maximizing interpolation function has already been asked and answered, see here for example. Yet, I observe a strange behaviour. Well, I can understand that the wrong guess of ...
1
vote
1answer
58 views

Merging of multiple 3D plots with Show using unified ColorBar

This question follows my initial question that can be found here. I created the following 4D plot (3 spacial coordinate + color) by interpolating points separately. The full data (1.4Mb) can be ...
2
votes
1answer
98 views

Results of ArgMax as a function of a parameter with InterpolatingFunctions

I would like to obtain a function and its derivatives, where the function is defined as the solution to a maximization problem. The obvious approach ...
5
votes
1answer
225 views

Smooth 3D plot with colour of scattered data

I have a set of scattered 3D points with coordinate (x,y,z) and an intensity associated with it. I would like to do a smooth surface with the intensity being represented by the colour. My points ...
3
votes
1answer
120 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
2answers
793 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 ...
4
votes
2answers
116 views

Integrating an interpolating function

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

Help with Time-Seried dataset

I can't seem to figure out the best way for directly inputting interpolated values into a dataset. I turn to your expertise for guidance. So, I have a multi-year time-series dataset. Column 1 is time ...
8
votes
1answer
182 views

Bug? Problem with derivative of interpolating function from FEM

Bug introduced in 10 or earlier and fixed in version 10.4 I am really not sure if this is a bug or I am missing something very trivial. QUESTION: What I am missing in order to obtain the partial ...
3
votes
2answers
57 views

Numbering indices / array element positions while creating an array (using 3 argument form)

I am new to Mathematica and trying to create a list that I can use within the InterpolatingPolynomial function. e.g. ...
5
votes
1answer
156 views

FunctionInterpolation error when specifying AccuracyGoal

Bug introduced in 8 or earlier and persisting through 10.4 or later In the help page ref/message/FunctionInterpolation/ncvb, it is mentioned that one should ...
0
votes
2answers
98 views

Plotting the solution of a differential equation with its derivative [closed]

The question requires checking of numerical solutions to a differential equation by substituting in those solutions. The original equation is as follows; ...
1
vote
1answer
85 views

Interpolation of a border between regions in ListDensityPlot

Let's say there is a scalar field dependent on two coordinates {x,y}, so a set {x, y, f}, and I use a ListDensityPlot to plot it: ...
1
vote
2answers
65 views

Export NDSolve data

I have calculated a solution of a system of differential equations using NDSolve and generated a plot. How could I extract the data of the solutions? The input is ...
0
votes
1answer
50 views

How to exchange interpolating function results of NDSolve between different platforms?

For example, I have a interpolating function solution by NDSolve in a windows x64 platform and want to share the result to users in other windows x86. I tried the DumpSave and ".mx" binary format, ...
1
vote
1answer
32 views

Why does `ListInterpolation` convert integers to reals in the internal representation?

This problem is mentioned in my self-answer here. Here is an illustration of the problem: ...
1
vote
1answer
77 views

How to fix the error InterpolatingPolynomial::ipdup: The abscissas are not distinct [closed]

I'm trying to plot the function Abs[InterpolatingPolynomial[..] - f[x]] where f is a function. I receive the error: InterpolatingPolynomial::ipdup: The ...
6
votes
2answers
3k views

Is it possible to compute with the trapezoidal rule by numerical integration?

Is it possible to compute trapezoidal rule numerical integration? I know that Mathematica has Interpolation, and that a list of points can be interpolated and then ...
8
votes
2answers
833 views

Finding a 3d curve from torsion and curvature with NDSolve

I'm trying to use the Frenet–Serret formulas to find the curve that matches the torsion and curvature I specify numerically with an InterpolatingFunction. The ...
4
votes
1answer
124 views
3
votes
0answers
59 views

Weird behaviour for a vector InterpolatingFunction inside an NDSolve

I have run into some weird behaviour on the part of NDSolve which I find pretty bizarre and which I would like to understand better. Suppose, for the sake of ...
11
votes
2answers
161 views

Unexpected view of the Comsol result when I postprocess it in Mma

I simulated some nonlinear PDE using Comsol. Here one can find the results u=u(x,y) in the form of an Excel table with the terms ...
6
votes
2answers
137 views

Getting an explicit representation of the function returned from Interpolation [duplicate]

I am using Interpolation to get an InterpolatingFunction that fits a set of points. For example, ...
0
votes
1answer
91 views

Interpolate the discrete list into continuous function

I have a data whose list plot shows up following graph I would like to interpolate the missing data and make the function continuous but for particular x-coordinate there is multiple values of $y$ ...
2
votes
1answer
117 views

FindRoot of interpolating function from NDSolve

I am having issues finding the root of an interpolating function obtained from NDSolve. For example: ...
9
votes
1answer
137 views

Non-rectilinear integration of InterpolatingFunction

Bug introduced in 7 or earlier and persisting through 10.3.1 [CASE:3487737] I have a 2-d array that I would like to resample into a different coordinate system and integrate along one of the new ...
3
votes
3answers
155 views

Smooth initial data

I need something that produce pseudorandom smooth initial data for modelling phase separation equations (Cahn-Hilliard and simular). Generator code for now: ...
0
votes
1answer
48 views

How to define InterpolatingFunction on a variable set of points?

I would like to define an InterpolatingFunction to which data points are transferred as a parameter, e.g.: ...
8
votes
3answers
104 views

Indexed and array-valued interpolations

Bug introduced in 10.1 or earlier and persisting through 10.3.0 or later Using Indexed on an InterpolatingFunction leads to ...
0
votes
1answer
55 views

Convolution of interpolated data with function doesn't work

I need to convolve one function with interpolated data: function: av1 = 1.3888*(12/20)*10^8; bv1 = 2.5; tr5[t_] = Exp[-(av1*t-bv1)^2]; Data: ...
10
votes
1answer
333 views

Interpolation function way off

I have a simple list of data points to which I would like to fit an interpolation function. However, the results given by Interpolation[] gives an oscillating function which is not warranted by the ...
0
votes
2answers
98 views

Gradient of interpolated 3D data in mathematica 9

tt = Flatten[Table[{x, y, z, btot[x, y, z]}, {x, -1, 1, 0.1}, {y, -1, 1,0.1}, {z, -1, 1, 0.1}], 2]; ff = Interpolation[tt] Till here it is working fine as it is ...
2
votes
1answer
113 views

Interpolation of a multivariate function with duplicated 2D abscissa points

I want to interpolate a function q[a,b] I have a data file which has the form {a,b,q} a sample is following ...
2
votes
1answer
62 views

How to perform multi-variate Interpolation from discrete data in a text file [closed]

I have a table of data of 4 columns in text file. x y z w This is basically $(x,y,z)\rightarrow w$. How can I use an interpolation function in Mathematica to figure out an equation $f$ of 3 ...
0
votes
0answers
88 views

Interpolation of 4D data on a triangular grid

I need to interpolate a function defined on a triangular surface (grid). The grid is defined as ...
4
votes
1answer
130 views

Saved InterpolatingFunction behaving badly

Bug introduced in 10 and persists through 10.3.1 or later I created this InterpolatingFunction, and NIntegrate gives an ...
5
votes
1answer
84 views

How to use BSplineFunction for calculating derivative

I have a set of data like the following data = {{x1,y1},{x2,y2},{x3,y3},......} Now I use ...
0
votes
1answer
36 views

define function with 3d discrete points and find corresponding value from that function [duplicate]

Now I have a set of 3d discrete points in the form of {x,y,z} and want to interpolate them and define them into a function making x and y as the variables. Subsequently read corresponding values of z ...
4
votes
2answers
152 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 ...
1
vote
0answers
491 views

Interpolating function as a model in Mathematica's procedures for fitting

Is it possible to use interpolating function with parameters as a model for NonLinearModelFit (and other integrated methods for fitting)? Similar question was ...
3
votes
1answer
63 views

Using the InterpolatingPolynomial function

How can I find the interpolation polynomial for the function $f(x) = \frac{1}{1+2x^2}$ with interpolation knots $x_k = 1 + 0.2k , k=0,1,...,6$ using the ...
1
vote
0answers
46 views

Find interpolation polynomial using newtons formula

I found this program for calculating the interpolation polynomial using Newtons formula. This function takes as input data points and returns a polynomial. For example: I want to find the ...
2
votes
1answer
116 views

Is there a reason why some specific arrangement of scattered grid points would yield bad RBF (Obtuse package) interpolation results?

I have an arrangement of grid points given by the figure below (the datagrid data is posted below at the end of the post): They correspond to electrode positions of an EEG signal. I am ...
9
votes
2answers
671 views

Function Interpolation with Automatic / Algorithmic Values Mesh

I have an underlying function f(x,y,z) that is computationally intensive, but is smooth and continuous. I'm needing to find the function values along a line in xyz. Currently, I'm calculating f at ...
3
votes
0answers
75 views

Data Interpolation of deaths by date

I am working with an ebola dataset from Guinea, 2014:(http://currents.plos.org/outbreaks/article/estimating-the-reproduction-number-of-zaire-ebolavirus-ebov-during-the-2014-outbreak-in-west-africa/). ...
5
votes
0answers
73 views

InterpolationOrder has no effect on ListContourPlot when the data is of the form {x,y,f[x,y]}

This is related to the issue brought up here, if you want to mark it as duplicate feel free to do so, but it is slightly separate. Take two sets of data, identical except for the form, ...