Questions on the interpolation functions in Mathematica (Interpolation[], ListInterpolation[], FunctionInterpolation[], InterpolatingPolynomial[], etc.)
12
votes
4answers
1k views
Getting the interpolation function from a list plot
I have conducted a chemistry experiment and obtained a list of concentrations of a reactant against time. I plot a graph of this using Mathematica's ListPlot ...
4
votes
3answers
132 views
How could I get the value of y[t] at each specific interpolation point?
sol = NDSolve[{Derivative[2][y][t] + Sin[y[t]] == 0, Derivative[1][y][0] == 0, y[0] == 1},
y, {t, 0, 2}]
the above-mentioned differential equations can be solved ...
9
votes
1answer
724 views
Fitting a spline to data with FindFit?
I am trying to find a function that fits my almost linear data. A high order polynomial model has too much residual. So I was hoping to use Mathematica to fit splines to the curve.
This is what I ...
14
votes
2answers
486 views
Fast Spherical Linear Interpolation of list of quaternions
An accurate way to interpolate between two quaternions is to use Spherical Linear Interpolation (Slerp) because it preserves the unit length, whereas straightforward linear interpolation does not, as ...
10
votes
3answers
421 views
Derivatives (divergence, gradient, curl) of interpolated 3D data
How can I calculate a vector derivative (i.e. divergence, gradient, curl) of interpolated data? For sample data, you can use:
...
12
votes
2answers
426 views
Higher order periodic interpolation (curve fitting)
I have a list of points in 3D, and I want to get a smooth interpolation or curve fit (it is more for illustration) of these points such that the first and second derivatives at the start and end ...
5
votes
2answers
129 views
How to get the boolean value of an inequality involving an InterpolatingFunction?
Here's the code:
yan = FunctionInterpolation[x^2, {x, -1, 1}];
FullSimplify[yan[x] > -1, -1 < x < 1]
Needless to say, what I expect to see in the output ...
1
vote
1answer
112 views
Trying to generate a function from InterpolatingFunction with FunctionInterpolation
Here is the code (I'm sorry to give you such a complex code sample but I failed to reproduce the error with a simpler InterpolatingFunction):
...
0
votes
1answer
311 views
Fourier series of interpolating function result of NDSolve
I am having a tough time formulating the right question but here goes.
I know that solving the pde as in here gives me an interpolating function. I understand that the interpolating function object ...
2
votes
1answer
589 views
How do I prevent NIntegrate::inumr errors within other functions?
I believe this question is best illustrated with a simple example. If I run
FunctionInterpolation[NIntegrate[a + b, {a, 0, 1}], {b, 0, 1}]
I get errors of the ...
10
votes
2answers
385 views
Interpolation of mostly-structured 3D data
this question relates to interpolation of 3D data and Improved interpolation of mostly-structured 3d data
I have an irregular 3d data set that is quite large (around 70,000 triplets---let's call it ...
5
votes
1answer
376 views
Getting an InterpolatingFunction from a ContourPlot
I have a function, say
minimizeme[Ω_][β_][ϵ_] = ϵ^2 Ω - Log[2 (Cosh[2 β] + Cosh[2 β ϵ])]/(2 β);
I want to find its critical points in $\epsilon$ for a given ...
1
vote
1answer
196 views
Interpolate specific columns of data
I have a txt file with 3 columns of data:
x y1 y2
How do I import the file then create 2 functions, one interpolated with {x,y1} values and the other interpolated with {x,y2} values?
This ...
3
votes
3answers
605 views
Retrieve values of InterpolatingFunction
While analyzing a large system of ODE's, I defined a particular ratio p, which contains some variables that are represented by ...
14
votes
1answer
214 views
Why does LogLinearPlot sample its argument outside the specified domain?
I experience a weird bug in the function LogLinearPlot. If the input is an interpolation function, such as the one created like this,
...
8
votes
3answers
440 views
Ηow to create an interpolated CDF from its samples?
I want to use a distribution I have only aggregate statistics on, namely its CDF sampled at certain points. I would like to keep it "nonparametric" (remain noncommittal on the parametric form), but I ...
4
votes
2answers
635 views
Is it possible to compute trapezoidal rule 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 ...
12
votes
4answers
350 views
How to reduce the InterpolatingFunction building overhead?
I want a linear interpolation from the following example list:
...
6
votes
1answer
295 views
5
votes
2answers
232 views
How to find Matano plane
I have discrete collection of data points (10 to 10^4). I want to describe them by a continuous function and find a x value z, ...
16
votes
2answers
424 views
Improved interpolation of mostly-structured 3d data
This question arose in response to a comment by Leonid to my answer for this question. He noted that for unstructured grids, Interpolation can only use ...
9
votes
2answers
2k views
interpolation of 3D data
I have a 3D surface given in data-points of the form ${x,y,z}$. What is the easiest way to get the interpolated value $z=f(X,Y)$ for given coordinates ${X,Y}$ (which are of course not in the data ...
3
votes
1answer
166 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:
...
17
votes
1answer
2k views
How does Interpolation really work?
I'm looking for some explanation or advice, not help in solving something. Recently I finished my program and my supervisor said "Ok, now it's time for your first paper: write a scientific text about ...
1
vote
1answer
220 views
Mapping and Interpolation
Does Mathematica have a mapping function like scipy or any of the multidimensional ones?
By this I mean something like mapping $[1,100]$ onto $[7,20]$ for example.
Looking at Interpolate I only ...
7
votes
2answers
324 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 ...
16
votes
1answer
307 views
How to fix broken InterpolatingFunction?
I have an InterpolatingFunction based on irregularly-gridded data, like this:
...
4
votes
2answers
729 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 ...
10
votes
2answers
448 views
How to add an interpolating point to InterpolatingFunction?
Suppose I have an InterpolatingFunction object defined on $[\epsilon,1]$; let's call it f. What is the best way to construct a ...