Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
5
votes
1answer
125 views

Eigenvalues and numerical eigenfunctions for similar differential operators

I am looking to numerically approximate the eigenvalues and eigenfunctions for a differential operator I am working with, assuming $\pi$ periodic boundary conditions. Namely, I define the function $...
45
votes
5answers
1k views

How can the behavior of InterpolationOrder->0 be controlled?

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
10
votes
2answers
535 views

Morphing between two functions

Assume we have 2 peaked positive functions f[x_] := Exp[-(x + 3)^2] g[x_] := 1/2 Exp[-(x - 3)^2/4] that look like Would it be possible to numerically find a ...
0
votes
0answers
78 views

Get R^2 value between interpolating functions and a list of points

I am looking to compare the degree of accuracy of a theoretical model by comparing my theoretical curve to my experimental data points. My theoretical curve is an interpolating function generated ...
3
votes
3answers
281 views
0
votes
2answers
113 views

Non-linear differential equation with tricky variable dependence

My problem regards solving a differential equation and can be reduced to the problem of finding $f(x)$ such that $\frac{df}{dx}=\frac{dh}{df}$, with $h(f)$ a known function. I have this list of data,...
2
votes
1answer
50 views

Interpolating and subtracting two sets of data

I have a data set "data9k" with x varying from 0 to 365, and another data "data0" set with x varying from 0 to 365. But the x values for both data sets are not same but similar. I want to subtract the ...
27
votes
4answers
7k views

Data interpolation and ListContourPlot

I am fairly new to Mathematica and I have two quick questions on using it for a Hydrology and Hydrogeology class. One is about data interpolation and interpolating without any data defined in an area. ...
6
votes
1answer
156 views

How can I accelerate repeated interpolation of a very large dataset?

I am solving a 4D time-dependent PDE using a discretization method. My query is not about solving this; because I am doing it in the following code. The code is OK and it works fine. My main problem ...
3
votes
0answers
63 views

Extracting part of an Interpolating Function [closed]

I get an InterpolatingFunction, call if F1, as a solution to NDSolveValue. I then need to do further operations on this function. However, I only need to work with a small part of the domain of the ...
1
vote
2answers
55 views

How can I convert a matrix of 3d experimental data into a 3d list which can be interpolated in a f(x,y) function

I have a 3d experimental *.txt data with the form: y1 y2 y3 x1 f(x1,y1) f(x1,y2) f(x1,y3) x2 f(x2,y1) f(x2,y2) f(x2,y3) x3 f(x3,y1) f(x3,y2) f(x3,y3) I need to ...
11
votes
1answer
234 views

Meaning of InterpolationOrder -> All for multidimensional interpolation

What specific method does Interpolation use for unstructured multi-dimensional data when we set InterpolationOrder -> All? ...
4
votes
3answers
141 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 ...
1
vote
2answers
62 views

Better fit for points with exaggerated deviations

I used the InterpolatingPolynomial function to get a polynomial that meets my points. But I noticed that there is a deviation in the final intervals. ...
2
votes
2answers
162 views

How to use NDSolve with limited RAM?

How can I use NDSolve when running out of RAM? The code I am implementing: ...
1
vote
1answer
52 views

NSolve with Interpolation function

I am trying to apply NSolve to an Interpolation function which I have evaluated before. For a function of 1 argument everything works out but as soon as I try to apply the procedure for a function of ...
1
vote
2answers
84 views
5
votes
1answer
66 views

Weirdness with Interpolation of data and InverseFunction

Bug introduced in 8 or earlier and persisting through 12.0 Something strange is happening with this list of data: ...
2
votes
1answer
42 views

Narrowing the range of an interpolating function while keeping integral the same?

Consider an interpolating function derived from some data, e.g. ...
0
votes
1answer
65 views

Factor to measure polynomial fit

I am trying to use InterpolatingPolynomial to fit a polynomial to a given set of points representing a relationship between two variables. I would like to find a ...
3
votes
2answers
236 views

How do I restrict an interpolated function to only take values > 0?

I have a list of points which looks like this when plotted with Joined -> True: I'm interested in the area under the curve with x-axis > 0 as a ratio to the ...
4
votes
2answers
252 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 ...
6
votes
2answers
816 views

Integration of Interpolated function take an unacceptable amount of time

I have a simple integration which, when using an interpolation function, is taking too long to calculate: ...
3
votes
0answers
96 views

How do I truncate an interpolating function?

I have a very large interpolating function and want access the function at one point in time. I am running out of RAM running ...
0
votes
0answers
58 views

How to apply the utility Packages for Numerical Differential Equation Solving

I have solved two coupled equations with {Solf, Solg} = NDSolveValue[eqns, {f, g}, {x, 0, L}, {t, 0, tmax}] and want to extract the computational grid ...
1
vote
1answer
94 views

Interpolating 3D noisy data

I have some noisy 3D data that looks like this: ...
8
votes
1answer
397 views

How do you interpolate outside the range of data?

I've got a simple interpolation function using data from an external program. For values above 3,000, the function reaches a limit. ...
1
vote
1answer
125 views

Regression to fit data with an integral equation

I have a set data and I know that this data are best fitted by the following equation, assuming that f($\tau$) is a log normal distribution and $M_{eq}$ = 1.5: $M(t,\tau)= M_{eq} \int (1-e^{-t/\tau}) ...
1
vote
1answer
81 views

Interpolating data from Excel

Sorry for the probably mainstream question, but I have not found the answer I was looking for yet. I have this Excel file: https://drive.google.com/file/d/1UhkYdoaqXQIsf6opOx-EBgG7xPxxHga3/view and I ...
4
votes
1answer
169 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 ...
1
vote
0answers
54 views

Interpolation of multidimensional data: some domains are lost

I am trying to make a reasonable interpolation of a dataset having the form dataset = {{x1,x2,x3,f[x1,x2,x3]},...}. I to the interpolation in the following way: <...
1
vote
1answer
80 views

How to make that interpolation?

I have the following dataset: SetDirectory[NotebookDirectory[]]; TableSpectrum = Import["spectrum.dat", "Table"]; I want to make the interpolation. However, when ...
4
votes
2answers
199 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<...
0
votes
1answer
39 views

TargetUnits aren't working as expected on an InterpolatingFunction

Short version: My understanding of the use of TargetUnits in a Plot statement is that if the function being plotted has units, MMA will attempt to convert the output of that function to the unit form ...
3
votes
0answers
94 views

How to use an interpolating function as an intial condition for a PDE? [closed]

I want to be able to approximate a PDE, but my eigenfunction is an Interpolating function. Is there a way I can use an interpolating function as an initial condition in the PDE. For Example: ...
22
votes
1answer
698 views

Mismatch between Mathematica and COMSOL in 3D FEM problem

I would like to solve an advection-diffusion problem on a torus domain. There are three Dirichlet conditions: One at the inlet (concentration $c=0$), one at the outlet ($c=0.5$) and one at the wall ($...
2
votes
2answers
254 views

Fitting two-dimensional data

For this question, I cannot use random sample data. So the actual data can be found here. The data file contains three columns, where the first two are the coordinates $(x,y)$, while the third is the ...
3
votes
1answer
87 views

Problem with interpolating function returned by NDEigensystem

I'm trying to evaluate interpolating function returned by NDEigensystem at a point but Mathematica won't evaluate it. ...
1
vote
1answer
101 views

Transpose Error

I have this code: ...
7
votes
1answer
106 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 ...
1
vote
2answers
135 views

Interpolating missing data

I have a data set that contains data of the form (x0, y0, f1, f2, i1, i2, i3). The (x0, y0) are the coordinates, while the values f1 and f2 are real numbers (i1, i2, i3 correspond to some integers ...
1
vote
1answer
127 views

Mesh quality error with interpolation of table

I am trying to interpolate a table of the following form. {{x1,y1,z1},{x2,y2,z2}...} Where z depends on x and y, and x ranges from 0.01 to 1 in steps of 0.01, ...
0
votes
0answers
84 views

InterpolatingFunction in NSolve

I'm trying to get NSolve to solve a simple system of equations. It makes use of various interpolating functions (for thermodynamic properties). I can solve the system outside of NSolve by ordering the ...
0
votes
1answer
142 views

Table and FindRoot of a two-variable interpolated function

I am having difficulty solving for the roots of the following interpolating function: ...
1
vote
1answer
51 views

The labels in the plot don't appear

the labels in the plot doesn't appear, axeslabel, plotlabel and plotlabels. ...
0
votes
0answers
43 views

Obtaining the equation type of an interpolated function

I used InterpolatingFunction on a set of points. How can I know the type of that equation ? (polynomial, sinusoidal, logarithmic,etc...). I am looking for a general case answer. Here is an example ...
5
votes
2answers
425 views

How can I fit a function onto a histogram?

SampleData = RandomVariate[RayleighDistribution[3], 5000]; Histogram[SampleData] This creates a histogram that (in my case) looks something like this: I want to ...
0
votes
1answer
44 views

How to obtain the correct interpolation for the following data?

I have a dataset DistrTemp.dat. It represents a set of data in the form {{x,y,z,f[x,y,z]}}. Here, x defines a system, while ...
0
votes
1answer
177 views

Interpolation function error: The quality of the underlying mesh is too low

Consider a dataset BplustoPiXlight.dat (alternative link). I import it and try to interpolate: ...

1 2
3
4 5
17